Dev Ops · n8n

Detect a Silently Failed Cron Job with a Heartbeat Monitor

An n8n workflow that expects a 'ping' from each of your scheduled jobs within a window, and alerts you when an expected heartbeat doesn't arrive — catching the cron, backup or ETL job that fails silently, which is the failure mode dashboards never show.

difficulty Intermediatesetup 40 minresult A missed heartbeat from any monitored job triggers an alert — you learn about silent failures immediately
  1. 1

    Expose a heartbeat webhook

    A Webhook node accepts ?job=name pings. A Code node writes the current time for that job into workflow static data. Your jobs curl this URL on success.

  2. 2

    Schedule the watchdog

    A separate Schedule Trigger runs every few minutes to check for overdue jobs.

  3. 3

    Find overdue jobs

    A Code node reads each job's last-seen time and expected max gap; it outputs any job that has exceeded its window without checking in.

  4. 4

    Alert on misses

    A Slack node posts which job went quiet and how long ago it last ran, so you can investigate the silent failure before it snowballs.

Frequently asked questions

How does a job send a heartbeat?

At the end of a successful run, your job makes a simple HTTP request to this workflow's heartbeat webhook with its name. That single line — a curl at the end of a cron script — is all the instrumentation you need.

How does it know a heartbeat is missing?

The webhook records each job's last-seen time. A separate scheduled check compares now against each job's expected interval; if a job hasn't pinged within its window, it alerts. Absence of a signal is exactly what most monitoring misses.

About this recipe. Recipes on FlowRecipesHub are written for business owners, not developers, and are tested before publishing — how recipes get made. Some ingredient links are affiliate links that cost you nothing — full disclosure.