4 ms·
Interesting, newbie question: where do you put the x.crontab file and how do you get the system to run it? Thanks
by supster 10y ago
Interesting, newbie question: where do you put the x.crontab file and how do you get the system to run it? Thanks
- thevibesman 10y agox.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.
- harshreality 10y agoI 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.