Skip to main content

Cron

How to Monitor Cron Jobs (the Right Way)

Cron jobs fail silently more often than any other system. The cron daemon stops, MAILTO swallows errors, the script crashes 5 minutes in — and nobody notices for days. Heartbeat monitoring catches these by inverting the question: instead of asking 'did the job fail?', it asks 'did the job not finish?'.

Try our Cron monitor

1. Add a ping at the end of every cron

Append && curl -fsS https://checkfast.io/api/ping/ to your cron entry. The ping fires only if the job exits 0. If the script crashes or hangs no ping arrives.

2. Configure the schedule

Tell CheckFast (or any heartbeat service) the same cron expression you use in crontab. The service starts a countdown after each expected run — if the ping doesn't arrive within the schedule + grace period you get alerted.

3. Set a sensible grace period

If your nightly backup usually takes 10-20 minutes but sometimes 35 set the grace period to 45 minutes. Too tight = false alerts. Too loose = late detection. Aim for the historical p99 + 50%.

4. Record explicit start and failure events

For diagnostic context send?type=start when the job begins?type=fail on an explicit failure and the base ping URL on success. CheckFast records these markers but does not currently derive duration history p95 or hung-job alerts from them.

5. Configure alerts

Starter includes Telegram email and in-app alerts. Pro and Agency also include Slack and webhooks. Delivery depends on the configured check cadence and external providers so do not assume a fixed end-to-end latency.

Want to verify your setup?

Run the check now