Heartbeat monitoring

Cron job and heartbeat monitoring that catches silent failures

Scheduled jobs fail quietly. With heartbeat monitoring, your job sends a small signal each time it succeeds, and Onlineisit alerts you when the signal stops arriving.

How heartbeat monitoring works

Unlike a website, a cron job cannot be reached from the outside. Instead the job checks in with us. If no check-in arrives within the expected period plus your grace time, you get an alert. The silence is the alert.

  • Works for any scheduled task

    Nightly backups, daily email reports, data syncs, queue workers and any other job that should run on a schedule.

  • One line to set up

    Add a single curl request as the last step of your job. No agent or library to install.

  • Expected period and grace time

    Tell us how often the job runs and how much delay is acceptable. Small delays will not cause false alarms.

  • Catches jobs that never start

    If the server is down, the scheduler is broken or the job crashes, the ping never comes and you are alerted.

  • Same alerts and history

    Heartbeats use the same email alerts, incident timeline and reports as your website monitors.

Monitor a cron job in three steps

  1. Add a heartbeat

    Open Heartbeats, choose Add Heartbeat, name it, and set the expected period and grace time.

  2. Copy your ping URL

    Open the setup guide on the heartbeat to get the unique URL generated for this job.

  3. Ping when the job succeeds

    Add this as the last step of your job:

    curl -fsS "YOUR_HEARTBEAT_URL"
    Send the ping only after success, never at the start or in a "finally" block, or failed jobs may look healthy.

Heartbeat monitoring FAQ

What is heartbeat monitoring?

Heartbeat monitoring (also called dead man's switch or cron monitoring) alerts you when a scheduled job fails to check in on time, instead of probing the job directly.

How do I monitor a cron job?

Create a heartbeat, copy its ping URL, and add a curl request to the end of the job so it pings after each successful run.

What is grace time?

Grace time is extra waiting time after the expected period, so a job that runs slightly late does not trigger a false alert.

What happens if the job crashes?

The ping is never sent, the heartbeat becomes overdue, and you are alerted.

Know first when something breaks

Create a free account and add your first monitor in a few minutes.