Skip to content

Feature

Heartbeat monitoring for cron jobs and workers

Scheduled jobs fail silently: nothing errors, nothing logs, the job simply does not run. A heartbeat monitor turns that silence into an alert.

Updated 25 October 2026 · By the Upcertain team

How it works

  1. Create a heartbeat monitor and tell it how often the job runs, from every 30 seconds to every 30 days.
  2. Add a grace period for jobs whose run time varies, up to one day (60 seconds by default).
  3. Copy the monitor's unique URL and call it at the end of each successful run, with GET, POST or HEAD.
  4. If no call arrives within the period plus the grace period, Upcertain opens an incident and alerts your channels. The next call resolves it.
# crontab: back up every night at 02:00, then report in
0 2 * * * /usr/local/bin/backup.sh && curl -fsS -m 10 --retry 3 https://upcertain.com/api/heartbeat/<your-token>

Calling the URL only after the job succeeds (&& in the example) means a job that runs but fails also stops the heartbeats. Examples for Node.js, Python, PHP and GitHub Actions are in the heartbeat setup guide.

What it catches

  • A crontab entry lost in a server rebuild.
  • A queue worker that crashed and was never restarted.
  • A backup script that now fails on a full disk.
  • A scheduled function your platform silently stopped running.

Details that matter

  • Starting clean. Until the first call arrives, the period counts from when you created the monitor. Resuming a paused monitor starts the clock again, so a job paused for a week does not alert the moment you resume it.
  • Repeated calls are cheap. Calls for one monitor inside 5 seconds share one answer, and each sending address may make 30 calls in a burst, then one a second.
  • The URL is the secret. Anyone with it can report in, so keep it out of public repositories. If it leaks, create a new heartbeat monitor, which gets a new URL, and delete the old one.
  • Same alerts as every monitor. Heartbeat incidents go to the same channels, with the same acknowledge and recovery messages. They have no confirmation checks: a missed deadline is already confirmed.

Why it is called a dead man's switch

The pattern is older than software: the alarm sounds unless someone keeps pressing the switch. Dead man's switch monitoring explains when to use it and how to pick the period and grace.

Questions

Does the heartbeat URL accept data?
It records that the call arrived and from which address. A body is ignored, so send whatever your HTTP client sends by default.
Can I use it for jobs that run every few seconds?
The shortest period is 30 seconds. For anything faster, call the URL from the worker's own loop at most once every 30 seconds.