Skip to content

Heartbeat monitoring

Monitor a cron job or scheduled task by having it check in to a unique URL within an expected interval.

Core
  • Requires monitors:manage

Outcome

A heartbeat monitor expects your job to send a request on a schedule. When the check-in is late or missing, Fajita alerts you.

How it works

  • Fajita gives the monitor a unique heartbeat URL with a token.
  • Your job sends a request to that URL at the end of a successful run.
  • You set an expected interval and a grace period.
  • A missing check-in past the grace period marks the monitor missed and can open an incident.

Send a heartbeat

End your job with a check-in
curl --fail --silent --show-error "https://heartbeat.fajita.io/REPLACE_WITH_TOKEN"

Cron example

crontab
# Run a backup, then check in only if it succeeded
0 2 * * * /usr/local/bin/backup.sh && curl -fsS "https://heartbeat.fajita.io/REPLACE_WITH_TOKEN"

States

A heartbeat monitor is healthy while check-ins arrive on time, and missed once one is overdue past the grace period. Deleting the monitor revokes its token.

Was this page helpful?