Skip to Content
Uptimeify Docs
MonitoringMonitoring types

Heartbeat Monitoring (Cron)

Heartbeat monitoring (also known as Cron Monitoring) works in reverse: instead of us checking your server, your server (or script) notifies us that it is alive.

This is perfect for monitoring:

  • Daily Backups: Ensure your database backups actually ran.
  • Background Jobs: Monitor workers, import scripts, or periodic tasks.
  • Intranet Devices: Monitor devices behind a firewall that can send outbound requests.

How it works

  1. You create a Heartbeat Monitor in the dashboard.
  2. We give you a unique Heartbeat URL.
  3. You configure your script (Cronjob, Worker) to call this URL when it finishes successfully.
  4. We expect a ping within your configured Interval (plus a Grace Period).
  5. If we don't receive a ping in time, we send an alert: "Heartbeat missing", with the expected interval, the grace period, the time of the last ping and how long it is overdue, e.g. Heartbeat missing: expected every 30 min + 5 min grace, last ping 2026-10-28T10:00:00.000Z, overdue by 12 min.
  6. While an incident is open, the next ping starts the recovery evaluation right away instead of waiting for the next scheduled run.

Configuration

Expected Interval

How often do you expect the ping?

  • Example: For a daily backup, set this to 24 hours (1440 minutes).
  • Example: For a minutely worker, set this to 1 minute.
  • Example: For a monthly report job, set this to 30 days (43200 minutes).
  • The interval accepts 1 to 43200 minutes (30 days). Unlike actively scheduled monitors, which we poll and therefore cap at 24 hours, a heartbeat only waits, so a long interval costs nothing.

Grace Period

How much delay is acceptable?

  • Example: If your backup usually takes 10 minutes but sometimes 30, set the Grace Period to 30 minutes.
  • We will only alert if Last Ping Time + Interval + Grace Period < NOW.

Expected state

By default a heartbeat alerts when pings stop. You can turn this around: on the create and edit page, under Alert when …, choose … a heartbeat arrives. Use this for jobs that only ping when something went wrong (e.g. an error handler).

  • Every ping then counts as a failure and opens an incident.
  • The incident resolves once no ping has arrived for the interval plus the grace period.
  • In the API the field is expectedState: up (default, alert when pings stop) or down (alert when a ping arrives).

Usage Examples

Linux Cronjob (Backup Script)

#!/bin/bash
# Run backup ...
pg_dump dbname > backup.sql

# If successful, ping the heartbeat
if [ $? -eq 0 ]; then
  curl -m 10 --retry 3 https://ping.uptimeify.io/ping/YOUR_TOKEN
fi

PowerShell (Windows)

# Run task...
Write-Output "Task running..."

# Ping Heartbeat
Invoke-RestMethod -Uri "https://ping.uptimeify.io/ping/YOUR_TOKEN"

Node.js Worker

await doImport();

// Ping
await fetch('https://ping.uptimeify.io/ping/YOUR_TOKEN');

On this page