I need to quickly and temporarily disable a particular job in crontab under linux. How can I do that?
By default, crontab file protections are set up so that you cannot inadvertently delete a crontab file by using the rm command. Instead, use the crontab -r command to remove crontab files. By default, the crontab -r command removes your own crontab file.
It is a wildcard for every part of the cron schedule expression. So * * * * * means every minute of every hour of every day of every month and every day of the week .
The quickest way would be to edit the crontab file and simply comment the job you want disabled. Comment lines in crontab start with a #
.
0 0 1 * * this_job_i_want.sh
# uncomment below to enable
# 0 0 2 * * this_job_i_dont_want.sh
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With