OnCalendar= is wall-clock. Sometimes you want relative timing instead: “a bit after boot, then every so often.” That’s what the monotonic timer options do — ideal for pollers, health checks, and report jobs that shouldn’t all fire at midnight.
The timer
/etc/systemd/system/healthcheck.timer:
[Unit]
Description=Health check shortly after boot, then every 15 min
[Timer]
OnBootSec=2min
OnUnitActiveSec=15min
[Install]
WantedBy=timers.target
With its paired healthcheck.service (a Type=oneshot, no [Install]):
[Unit]
Description=Run health check
[Service]
Type=oneshot
ExecStart=/usr/local/bin/healthcheck.sh
The monotonic options
OnBootSec=— fire this long after the machine booted.OnStartupSec=— this long after systemd itself started (close to boot on most hosts).OnActiveSec=— this long after the timer unit was activated (i.e. enabled/started).OnUnitActiveSec=— this long after the service it triggers last ran → the repeat interval.OnUnitInactiveSec=— measured from when the service last finished (use this if runs can take a while and you want a gap between runs).
All accept friendly spans: 30s, 2min, 15min, 1h, 1h30min.
Enable and verify
sudo systemctl daemon-reload
sudo systemctl enable --now healthcheck.timer
systemctl list-timers healthcheck.timer
Calendar vs monotonic: use OnCalendar= for “at 03:30”, monotonic options for “every 15 min from boot”. You can combine several On*Sec= lines in one timer (any of them firing triggers the service). Gotcha: OnUnitActiveSec= only repeats if the service actually ran at least once — that’s why pairing it with OnBootSec= (the first kick) is the usual pattern.