Most monitoring answers the question "is this thing broken?" A dead man's switch answers a harder one: "did this thing stop happening?" That distinction matters, because the scariest failures are the silent ones — a nightly backup that quietly stopped running three weeks ago, a cron job that died and took no error with it.

What a dead man's switch is

A dead man's switch — also called heartbeat monitoring or cron monitoring — inverts the usual model. Instead of you pinging the job to check it's up, the job pings you every time it runs. If the expected ping doesn't arrive in time, the monitor fires.

  • Traditional monitor: "I'll check your endpoint every minute and alert if it errors." Misses jobs that have no endpoint.
  • Dead man's switch: "Ping me every 24 hours. If you don't, I'll alert." Catches the silent stop.

What to use it for

  • Nightly database backups
  • Cron jobs and scheduled tasks
  • ETL / data pipelines
  • Certificate renewals, report generation, queue workers

How to set one up

Create a heartbeat monitor with an expected interval, then ping its URL at the end of the job — only on success:

    # crontab: nightly backup at 2am, ping on success
0 2 * * * /usr/local/bin/backup.sh && curl -fsS https://watch.nurbak.com/ping/your-monitor-id

# or in a script
pg_dump mydb > backup.sql && curl -fsS "$HEARTBEAT_URL"

If backup.sh fails (the && short-circuits) or the whole job never runs, the ping never fires, and the monitor alerts after the window passes.

Set the window with a grace period

A job that runs "every 24 hours" never runs at exactly 24-hour intervals. Give the monitor a grace period (say, expected every 24h + 1h grace) so normal jitter doesn't page you, but a real miss does.

Get alerted where you'll see it

Nurbak Watch provides heartbeat monitoring alongside endpoint and uptime checks: point your cron jobs at a ping URL and get a Slack, email or WhatsApp alert in seconds the moment a job goes silent — not next month when you notice the backups are gone.

Related articles