How to make changes to crontab in Linux take effect?
In Linux, changes made to crontab do not take effect immediately; you either need to restart the cron service or wait for some time for the changes to take effect.
- Restart the cron service: You can restart the cron service using the following command to make changes to the crontab take effect.
- Restart the cron service using sudo.
- Wait for a while: The cron service running on the system will periodically check for changes in the crontab file and they will take effect during the next scheduled task. By default, cron checks for changes in the crontab file every 1 minute, so usually you just need to wait for about 1 minute for the changes to take effect.
No matter which method you choose, the modified crontab will take effect.