Enabling and disabling cronjobs is so annoying and really hard to do from a script. That's why I wrote a small shell script called crontroll.

Examples

$ crontroll status updatedb
enabled: updatedb; 0 3 * * * updatedb

$ crontroll disable updatedb

$ crontroll status updatedb
disabled: updatedb; 0 3 * * * updatedb

$ crontroll enable updatedb

$ crontroll list
[x] apt-cron
[ ] at
[x] backup
[x] greg
[ ] mail
[x] tracking
[x] updatedb
[x] vdirsyncer

Setting up cronjobs

Instead of writing directly to your crontab file, create a file per cronjob in ~/.cron.

Example

~/.cron $ cat updatedb
0 3 * * * updatedb -U ~/drive

Then run crontroll reload to enable your new cronjob.

Download

Repository: https://github.com/Neo-Oli/crontroll