How to monitor a systemd timer and know when it stops

systemd timers are the modern replacement for cron on most Linux distributions, but they share cron's core blind spot: when a timer stops firing — masked unit, failed dependency, a box that never woke — nothing tells you. systemctl status only helps if you remember to look. A dead-man's-switch flips that around: your service pings a URL on success, and you're alerted the moment a ping is late.

Add the ping to your service unit

Create a check in Cronping matching your timer's schedule, then append the ping to the service's ExecStart chain — or add an ExecStartPost that only runs on success:

[Service] Type=oneshot ExecStart=/usr/local/bin/backup.sh ExecStartPost=/usr/bin/curl -fsS https://cronping.cronping-oren.workers.dev/ping/<your-check-id>

ExecStartPost only fires when ExecStart succeeds, so a failed run skips the ping and Cronping alerts you after the grace window.

Alert immediately on failure

Pair it with an OnFailure= unit that pings the fail endpoint so you don't wait for the window to lapse:

# backup-fail.service [Service] Type=oneshot ExecStart=/usr/bin/curl -fsS https://cronping.cronping-oren.workers.dev/ping/<id>/fail
# in backup.service [Unit] OnFailure=backup-fail.service

Now a failed or skipped timer surfaces as an email (plus optional Slack / Discord) instead of silence. Cronping is free — 20 checks, 1-minute resolution, no card. A ping URL takes about ten seconds to create.

Try it now

Get a ping URL in about ten seconds — no account, no email needed. Add an email later for alerts.

← All guides