Why uptime checks don't catch it
A website check asks "does this URL answer?". A cron job has no URL. The only signal is that something didn't happen, so the check has to run the other way: the job tells the monitor it ran, and the monitor alerts when it hears nothing.
How a heartbeat monitor works
- 01
Create a heartbeat monitor. It gives you a unique URL.
- 02
Your job calls that URL when it finishes successfully.
- 03
If no call arrives within the expected interval plus a grace period, you get an alert. When the job pings again, the monitor recovers.
Add the ping
# crontab: ping only if the job succeeded
0 0 * * * /usr/local/bin/backup.sh && curl -fsS -m 10 https://<heartbeat URL> > /dev/null# inside a shell script, as the last line
curl -fsS -m 10 --retry 3 https://<heartbeat URL> > /dev/null# GitHub Actions: last step of the scheduled workflow
- run: curl -fsS -m 10 https://<heartbeat URL>-f makes curl fail on an error status, -sS keeps it quiet except for errors, -m 10 stops it waiting more than 10 seconds.
Choosing the interval and grace period
| Job runs | Expected every | Grace |
|---|---|---|
| every 5 minutes | 5 minutes | 5 minutes |
| hourly | 1 hour | 10 minutes |
| every 6 hours | 6 hours | 30 minutes |
| nightly | 1 day | 1 hour |
Grace covers jobs that take a while or start a little late. Make it longer than the job's normal run time.
Jobs that run weekly or monthly can't be watched by a 12happy heartbeat yet: the longest interval is one day.
What the alert looks like
The same channels as your other monitors: email, Slack, Telegram, push, webhook or SMS. Every time is in UTC.
Safe by design
- The URL takes no API key and changes nothing; it only records "I ran".
- A mistyped URL returns 404, so it won't look like success.
- If the URL leaks, rotate it with one API call and the old one stops working at once.
Heartbeat monitors are on Pro ($15 a month, or $12 billed yearly) and Agency. Start free, and upgrade when you add your first job.
Start freeQuestions
How do I check if a cron job ran?
Look in the system log (grep CRON /var/log/syslog, or journalctl -u cron). To be told when it doesn't run, use a heartbeat.
Why isn't my cron job running?
The usual causes: the crontab was never saved (crontab -l); a relative path or a missing PATH; the script isn't executable; a time zone you didn't expect.
Can I monitor a job that runs every minute?
Yes. Set the interval to 1 minute and the grace to 2.
Does it work with Kubernetes, GitHub Actions or Windows Task Scheduler?
Yes. Anything that can make an HTTP request when it finishes can ping.