The crontab command has one of the worst UI problems:
1. "crontab -e" lets you edit your crontab file, and "crontab -r" deletes it (without asking). The two keys are next to each other.
2. "crontab" (no arg) reads the contents of the crontab file from stdin and replaces it. When you accidentally hit Ctrl-D after it, your crontab is replaced with an empty file.
Cronic (http://habilis.net/cronic/) has been a real life-saver when it comes to using cron in production services. I've been using it for 4+ years without looking back.
I never edit a crontab directly. I use external files and reinstall them with "crontab filename" as needed. Then of course the files can be revision-controlled.
Also, I name the files according to host so I remember exactly where they were installed in a networked environment (e.g. "host1.crontab", "host2.crontab").
I put per-user crontab stuff in ~/.cron/ not only cron-specific scripts go there, but ~/.cron/crontab is the (inactive) master copy of the crontab itself.
Make changes active with `crontab ~/.cron/crontab`
Diff with `diff -du <(crontab -l) <(cat ~/.cron/crontab)`
For servers or not-my-own-user crontabs, config management is the way to go. The crontabs should be in a config management repository, so there's not just a single copy that's deployed and active.
x.crontab can live wherever you'd like; you can even delete it after you install the crontab. When you run the following command
crontab x.crontab
your crontab file is replaced by the contents of x.contrab; or if you want to install x.crontab for another user
crontab -u www-user x.crontab
The actual location of x.crontab does not matter as it is just used to setup your cron jobs, but the system does not actually read from this file to run the jobs.
OnCalendar= has a less insane format than cron, exit code and output logging, locking, proper command line tools, and other niceties like Persistent= (catch up e.g. after system was powered off) etc.
(And yes, you can still have user "cronjobs" if you enable systemd user session lingering.)
There are lots of ways of scheduling stuff out there. The systemd stuff is Linux only, so there isn't really any good reason to bother to learn it for trivial stuff like timed jobs. Cron is much the same everywhere.
Which is why higher-level tools for system administration are awesome. NixOS will generate the .timer and .service files from two options sitting next to each other in a single file (script and startOn) - and you can put them right next to your application service definition and web server configuration. I assume there's systemd unit generators for Ansible, Puppet, etc etc too.
1. "crontab -e" lets you edit your crontab file, and "crontab -r" deletes it (without asking). The two keys are next to each other.
2. "crontab" (no arg) reads the contents of the crontab file from stdin and replaces it. When you accidentally hit Ctrl-D after it, your crontab is replaced with an empty file.