Hacker News new | ask | show | jobs
by efiala 3631 days ago
what if you are managing the crons externally, eg puppet, crontab -e is not always option
3 comments

1. If you don't have a test process for changes made with puppet, this is hardly a problem with cron.

2. Puppet handled that parsing for you and will throw errors if your syntax is wrong

I can't tell you the amount of times I've hit -r by mistake and regretted it..
I can. 0. There, more anecdata.

Honestly though, I never use `-e` either. I keep a ~/.crontab and edit that, and then `crontab ~/.crontab`.

Voila, backup/time machine/git friendly crontab.

I got bit by this once, and had to rescue the crontab out off the disk with GNU strings :(
Have a cronjob that backs up your crontab?
Use /bin/cat as editor. That should work nicely from Puppet.