Howto Disable Cron Jobs
Rather than edit a crontab(5) entry to disable a cron job, instead consider using a status file to disable the operation of a script. Various advantages include:
- Risk of operator error eliminated as crontab(5) file not edited.
- Ability to monitor the status file: trigger alarm if exists, record duration of existance for exact outage numbers.
Disabling the cron entry or disabling crond blur the line between system configuration and system operation. Using a status file distinguishes whether the configuration is correct, and whether the script should not run for some external reason (planned outage, data center migration).
Either use a filename based on the script name, perhaps somewhere under a custom /var directory. Also consider a global file to disable all scripts, or filenames that disable groups of scripts by function.
Technorati Tags: Unix