Guides/Tutorials

How to Monitor systemd Timers (the Modern Cron)

Updated June 14, 2026 5 min read

systemd timers are the modern replacement for cron on most Linux distributions, with better logging and dependency handling. They still fail silently though: a timer that was never enabled, a unit that errors, or a Persistent=false timer that missed its window while the box was off.

Add a ping to the service unit

# backup.service
[Unit]
Description=Nightly backup

[Service]
Type=oneshot
ExecStart=/usr/local/bin/backup.sh
ExecStartPost=/usr/bin/curl -fsS https://api.cronguard.dev/v1/ping/<your-uuid>
# backup.timer
[Unit]
Description=Run backup daily

[Timer]
OnCalendar=*-*-* 03:00:00
Persistent=true

[Install]
WantedBy=timers.target

ExecStartPost only runs if ExecStart succeeded, so the ping is a true success signal. Enable with: systemctl enable --now backup.timer

Catch failures explicitly

Add an OnFailure hook to ping a /fail endpoint when the service errors:

# in backup.service [Unit]
OnFailure=ping-fail@%n.service

# ping-fail@.service
[Service]
Type=oneshot
ExecStart=/usr/bin/curl -fsS https://api.cronguard.dev/v1/ping/<your-uuid>/fail
Check timers with systemctl list-timers — but nobody watches that at 3am. A heartbeat turns a missed timer into a push alert.

Monitor with CronGuard

Point the pings at a CronGuard monitor matching your OnCalendar schedule. If a timer is disabled, errors, or misses its run, you get instant alerts across SMS, WhatsApp, Slack, Telegram and email. Free to start.

Stop losing sleep over silent failures

CronGuard alerts you within minutes when a scheduled job fails to check in. No agent to install. Free to start.

Start Monitoring Free