4 ms·
0. Use systemd timers instead. OnCalendar= has a less insane format than cron, exit code and output logging, locking, proper command line tools, and other nice
by Ao7bei3s 10y ago
0. Use systemd timers instead.
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.)
- jle17 10y agoHaving to create two files for a single task must get old fast though.
- vertex-four 10y agoWhich 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.
- upofadown 10y agoThere 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.