Cron jobs silent-fail — the most common cause of data loss. Default cron: on error, email (if SMTP set up), otherwise nothing. Right approach: heartbeat monitoring (dead-man's switch) — cron pings a URL on success, monitoring service waits for a ping and alerts if missed. Solutions: Enterno Heartbeat, Healthchecks.io, Cronitor.
Below: step-by-step, working examples, common pitfalls, FAQ.
Free online tool — cron heartbeat monitor: instant results, no signup.
5 2 * * * /usr/bin/backup.sh && curl -fsS PING_URLcurl -fsS PING_URL/fail on the error path| Scenario | Config |
|---|---|
| Simple success ping | 0 3 * * * /usr/local/bin/backup.sh && curl -fsS https://heartbeat.enterno.io/ping/abc123 > /dev/null |
| Ping with duration | 0 3 * * * curl -fsS -m 10 https://heartbeat.enterno.io/start/abc123 &&
/usr/local/bin/backup.sh &&
curl -fsS https://heartbeat.enterno.io/ping/abc123 |
| Fail ping on error | 0 3 * * * /backup.sh || curl -fsS https://heartbeat.enterno.io/fail/abc123 |
| With exit code | 0 3 * * * (/backup.sh; STATUS=$?; curl -fsS https://heartbeat.enterno.io/ping/abc123/$STATUS) |
| Systemd timer alternative | # /etc/systemd/system/backup.service
[Service]
ExecStart=/backup.sh
ExecStartPost=curl -fsS https://heartbeat.enterno.io/ping/abc123 |
To effectively monitor cron jobs in 2026, utilize a combination of logging, alerting, and third-party tools. Set up logging in your cron configuration with 'MAILTO' for email alerts, or use tools like 'Cronitor' or 'Healthchecks.io' to track job execution and status. Ensure your monitoring solution can alert you to failures or missed jobs promptly, allowing for efficient troubleshooting and maintenance.
Cron jobs are scheduled tasks that run automatically at specified intervals on Unix-like operating systems. They are crucial for automating repetitive tasks, such as backups, system updates, and data processing. Monitoring these jobs is vital to ensure they execute as intended, preventing potential downtime or data loss.
Every cron job is defined in a crontab file, which specifies the timing and command to be executed. A typical entry in a crontab file looks like this:
0 2 * * * /path/to/your/script.shThis example runs 'script.sh' every day at 2 AM. Understanding the syntax of cron job timing is essential:
Given the critical nature of these tasks, proper monitoring becomes necessary to ensure that each job runs as scheduled. In this section, we will explore various methods to monitor cron jobs effectively, focusing on practical implementations and best practices.
A heartbeat monitor is a "reverse monitor": instead of us polling the service, the service signals us that it's alive. If no signal arrives within the set interval — we send an alert.
One GET request to a unique URL — and the monitor knows the job completed.
Set an acceptable ping delay to avoid false alerts.
Email and Telegram on missed ping. Repeated alert if silence continues.
Full ping log with timestamps — see every job execution.
cron job monitoring
background worker check
dead man's switch
payment queue monitoring
curl -s https://enterno.io/api/heartbeat/TOKEN — simple and reliable.Heartbeat monitor: 5 tasks free, Telegram and email alerts on missed runs.
Sign up freeOften SMTP isn't configured on a VPS → email never lands. Heartbeat actively alerts when cron didn't start at all (host down, cron daemon stopped).
Healthchecks — open-source + SaaS free tier. Enterno — integrated with uptime/SSL/DNS monitoring in one dashboard, + RU servers.
Same principle: <code>curl PING_URL</code> in postStart/postStop container lifecycle hook. Or a sidecar container.
Outbound HTTP is usually allowed. If not — self-hosted Healthchecks on internal network.
Free plan — 10 monitors, checks every 5 min, no card required. Upgrade for 1-minute interval and multi-region monitoring.