Getting started

How to monitor cron jobs and scheduled tasks (heartbeat monitoring)

A failed cron job rarely announces itself — the backup just stops. Heartbeat monitoring flips the problem around: instead of checking a URL, we wait for your job to check in, and alert you when it goes quiet.

← All articles

Why cron jobs need their own kind of monitor

A normal uptime monitor pings your website. But a nightly backup, a data import or a scheduled cleanup script has no URL to ping — and when it silently stops running, nothing looks broken until the day you need that backup and it is not there.

A heartbeat monitor (sometimes called a "dead man's switch") solves this. Your job sends a quick signal every time it finishes successfully. If that signal does not arrive on schedule, we mark it down and alert you.

How it works

When you create a heartbeat monitor you get a unique push URL. You call it at the end of your job. We expect to hear from it within the interval you set, plus a short grace period for normal variation. Miss the window and your alerts fire.

At the end of a Linux cron job

0 3 * * * /usr/local/bin/backup.sh && curl -fsS https://your-domain/api/push/YOUR_TOKEN

The backup runs at 3am; only if it succeeds does curl ping the URL. If the script errors, no ping is sent — and you hear about it.

From a PowerShell script (Windows Task Scheduler)

Invoke-RestMethod -Uri "https://your-domain/api/push/YOUR_TOKEN"

What you can monitor this way

Reporting failures and timing

You can tell us when a job fails on purpose by adding ?status=down to the URL, or record how long it took with ?ping=142. That way a job that runs but errors still surfaces — not just one that never ran at all.

Setting the interval and grace period

Set the interval to how often the job should check in, and the grace period a little above the job's normal run time so a slightly slow run does not trigger a false alarm. A daily backup that takes ten minutes might use a one-day interval with a thirty-minute grace.

Heartbeat monitors are available on Starter and above. Create one, drop the push URL into your job, and you will never again wonder whether last night's job actually ran.