Sunday, June 28, 2009

How to disable a cron job?

Simply click on Disable icon. Your cron job will be disabled, and no longer be executed.

---
For Unix/Linux users, you can simply edit your crontab file (using crontab -e), and add # at beginning of cron job line you wanna disable.

For example, you have this cron job:

*/5 * * * * lynx http://example.com/backup.php

And you wanna disable it. Change it into:

#*/5 * * * * lynx http://example.com/backup.php

2 comments:

  1. Thanks for the posting.

    Is there any other way than commenting the jobs, because I have more number of corn jobs to be disabled for a day.
    ReplyDelete
  2. If you wanna disable cron jobs at SetCronJob, you can click on the disable button:
    http://www.setcronjob.com/image/disable.png

    The trick: to disable a lot of cron jobs, you can click on their disable icons as fast as you can. This will send multiple request to SetCronJob, and cron jobs will be disabled at once.
    ReplyDelete