$crond.io
2026-03-08 · 7 min read

How to Monitor Cron Jobs in Production

Cron jobs are the backbone of production infrastructure. They handle backups, data syncs, certificate renewals, and cleanup tasks. Yet most teams have zero visibility into whether these jobs are actually running successfully.

Level 1: Heartbeat pings

The simplest form of cron monitoring is a heartbeat ping. After your job completes, it sends an HTTP request to a monitoring service. If the ping doesn't arrive within a grace period, an alert fires.

# Add a curl at the end of your script
*/5 * * * * /usr/bin/backup.sh && curl -s https://crond.io/ping/abc123

This catches jobs that stop running entirely, but misses failures — if the job runs but exits with an error, the ping never fires and you get a generic "missed" alert with no context.

Level 2: Exit code reporting

Better monitoring captures the exit code. A zero exit means success; non-zero means failure. This distinction lets your monitoring tell you what happened, not just that something went wrong.

# crond-agent captures exit codes automatically
*/5 * * * * crond-agent wrap --name "backup" -- /usr/bin/backup.sh
[crond.io] ping sent ✓ (exit 0, 1.2s)

Level 3: Duration tracking

Jobs that gradually slow down are a leading indicator of future failures. A backup that normally takes 30 seconds but now takes 5 minutes might overlap with the next scheduled run, or timeout entirely.

Duration tracking with trend analytics lets you spot this degradation and investigate before it becomes a production incident.

Level 4: Output capture

When a job fails at 3 AM, you need the error output to debug it. Without output capture, you have to SSH into the server, check log files (if they exist), and reconstruct what happened. With output capture, the stderr is right there in your monitoring dashboard.

Level 5: Full observability

The complete picture combines all four levels: heartbeat monitoring confirms the job ran, exit codes tell you the result, duration tracking spots trends, and output capture gives you debugging context. Add alert routing (email, Slack, webhooks) and you have production-grade cron monitoring.

Getting started

crond.io provides all five levels out of the box. The CLI agent wraps any command and reports everything automatically:

$ curl -sSL crond.io/install | sh
$ crond-agent wrap --name "my-job" -- ./my-script.sh

No code changes to your scripts. No infrastructure changes. Just wrap and go.

Read the full getting started guide →