Uptime Monitor

Heartbeat monitors

Watch cron jobs, backups and scripts. Your job calls a ping URL on a schedule, and a missed ping opens an incident and mails you.

3 min read

A heartbeat monitor turns the check around. Your own job calls a ping URL, and silence means trouble. By the end of this page you will have a heartbeat running from a cron job.

Heartbeats suit anything that runs on a schedule, such as backups, imports or nightly reports.

Add a heartbeat monitor

  1. Open the project and click Uptime monitor in the sidebar.
  2. Click Add monitor.
  3. Set Type to Heartbeat.
  4. Give the monitor a Name, such as "Nightly backup".
  5. Pick a Ping interval: every 5 minutes, every 30 minutes, every hour or every day. Match it to how often your job runs.
  6. Click Add monitor.

The message "Heartbeat created. Send a request to the ping URL before the timer runs out." confirms it. The monitor's row now shows its ping URL. Click the box to select the URL, then copy it.

Call the ping URL

Send a GET request to the ping URL each time your job runs. A POST with an empty body can be rejected before it reaches us, so use GET.

This cron line pings every 5 minutes. Swap in your own ping URL from the monitor's row.

*/5 * * * * curl -fsS -m 10 "https://brokenlinkchecker.io/hb/your-monitor-token" > /dev/null 2>&1

For a backup or another job that can fail, ping at the end, after the work succeeds. Then a failed run counts as a missed ping.

When a ping counts as missed

Every ping opens a new window. The window lasts one ping interval plus a quarter of that interval as grace:

  • Every 5 minutes: 6 minutes 15 seconds.
  • Every 30 minutes: 37 minutes 30 seconds.
  • Every hour: 1 hour 15 minutes.
  • Every day: 30 hours.

The first window starts when you create the monitor. So if nothing ever pings, an incident opens once that first window runs out.

What happens on a miss

A missed ping opens an incident with the cause "heartbeat missed". The down alert goes out at once. You get no repeat mails while the incident stays open.

The next ping closes the incident right away and sends the recovery mail. A single missed deadline opens the incident and a single ping closes it. Heartbeats skip the second-location check and Alert after.

Pause, edit and maintenance

  • Pause makes the ping URL ignore pings. Resume starts a fresh window.
  • Edit changes the Name and the Ping interval. Saving restarts the window.
  • While a maintenance window runs, missed pings do not count. Afterwards the heartbeat gets a full new window.

What the figures mean

For a heartbeat, the 24h and 30d figures count pings against missed deadlines. They are not a share of time. On a status page, a heartbeat shows when the last ping arrived, or "no ping yet".