Love me some systemd timers. Much more fun than cron.
- Sane handling of environment variables with
EnvironmentFile=
- Out of the box logging. Especially useful is the ability to
journalctl -f
to watch long-running processes, which I'm not sure whether possible with cron - The ability to trigger the service manually rather than setting the timer to
* * * * *
, then forgetting it's supposed to run in a minute, get distracted, come back in 15 minutes
My only complaint is it's a bit verbose. I'd rather have it as an option inside the .service
file. The .timer
requires some boilerplate like [Unit].description
(it... uh... triggers a service. that's the description), and WantedBy=timers.target
. But these are small prices to pay