Otherwise adding a file or deleting a file in /etc/cron.d/ is the way to go for automatic(ansbile, puppet etc) and package installations.
Otherwise adding a file or deleting a file in /etc/cron.d/ is the way to go for automatic(ansbile, puppet etc) and package installations.
However crontab -r has to be one of the most poorly thought out commands in UNIX. It removes the cron file and since r is only one character over from e on qwerty keyboards it's a painful and surprising typo.
2. Puppet handled that parsing for you and will throw errors if your syntax is wrong
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.
Instead of per-user crontabs. Much easier to manage.
With cron.d you can specify what user each cron entry should run as, so it is equivalent.
And there's "vipw" for the password file. Each of them with their own separate updating bugs.