Are there any established patterns for installing a kill or on/off switch for user cron jobs?
Rather than messing with crond
, I strongly suggest to implement some (even simple) form of locking inside your build scripts. For example, touch and check for a file in /var/run/
: if your script find something, than another process is building the project. You obviously need to remove the lockfile when finished.
As @GnP noted in the comments, you can also use the flock
utility for semi-automatically manage your lockfiles.
If you don't/can't rely on any locking mechanism, simple issue a service crond stop
to shutdown the crond
system.