ErrTapDOCS

Cron Heartbeats

Monitor scheduled jobs with ErrTap heartbeat monitors — detect missed and late runs before your users do.

How heartbeat monitors work

A cron monitor expects a ping (heartbeat) on a schedule. If the ping doesn't arrive within the grace period, ErrTap fires a CRON_MISSED alert.

This catches a class of failure that uptime checks miss: the server is up, but the scheduled job silently didn't run.

Creating a monitor

In the dashboard: Cron → New monitor. Supply:

FieldDescription
NameHuman-readable label
SlugURL-safe identifier — used in the heartbeat URL
ScheduleCron expression, e.g. 0 2 * * * (daily at 02:00 UTC)
Grace periodHow long after the expected run time ErrTap waits before alerting (default: 5 minutes)

Sending a heartbeat

After each successful job run, POST to the heartbeat endpoint:

curl -X POST https://your-host/ingest/cron/<slug> \
  -H "Authorization: DSN et_<your-key>"

Or use the SDK helpers:

// Node.js
import { heartbeat } from '@errtap/node';
await heartbeat('invoices-generate');
// Laravel
ErrTap::heartbeat('invoices-generate');

Missed detection

ErrTap computes the next expected run from the cron expression and monitors timezone. If a heartbeat isn't received within grace_period after that time, an alert fires.

A run is considered missed (not late) only after the grace window closes. This avoids false positives from jobs that occasionally run a few seconds past their scheduled time.

Alert configuration

Cron alerts fire on CRON_MISSED events. Configure channels under Alerts → Alert rules.