What does `Persistent=true` do, and when would you not want it?
AdvancedConceptcron and systemd timers
Answer
With Persistent=true on an OnCalendar= timer, systemd records the last trigger time on disk; if the machine was off when the timer should have fired, the service runs immediately at the next boot. Ideal for backups and log cleanup on servers that may be stopped (dev boxes, spot instances).
Avoid it when a late run is harmful: a job that sends a "daily report at 09:00" email, or a maintenance task that must only run inside a change window. Note that every timer on a fleet catching up at once after a mass reboot can spike load; combine with RandomizedDelaySec=.
More on cron and systemd timers
Explain the five cron time fields with examples.BeginnerWhat is different about the environment a cron job runs in?BeginnerWhat is the difference between a user crontab, `/etc/crontab`, `/etc/cron.d/` and `/etc/cron.daily/`?IntermediateHow do you prevent overlapping cron runs and capture output properly?IntermediateWhat is a systemd timer and how does it compare to cron?IntermediateWrite a minimal systemd service and timer that run a backup at 02:30 daily.Intermediate