Cron jobs fail quietly. A backup script stops running after a server move, a password rotation breaks the nightly import, or a full disk makes the invoice job crash at 3 a.m. Nothing is down, so a normal uptime monitor stays green, and you only find out weeks later when you need the backup or a customer asks where their invoice is. Heartbeat monitoring closes that gap. This guide shows how it works and how to set it up for free in a few minutes.
What is heartbeat monitoring?
A regular uptime monitor checks your website from the outside. A heartbeat monitor works the other way around: your scheduled job checks in. You get a unique URL, and your job calls it every time it finishes. If the call does not arrive on time, the monitor knows something went wrong and alerts you.
This catches every kind of silent failure at once:
- The job never started. The
crontabentry was lost, the server rebooted without the scheduler, or the container was replaced. - The job crashed. An error stopped the script before it reached the end.
- The job hangs. It started but is stuck on a locked database or a slow API and never finishes.
- The whole server is gone. No server, no ping, so you hear about it even if nothing else is watching.
Which scheduled tasks should you monitor?
Start with the jobs that cost you the most when they stop without anyone noticing:
- Backups of databases and files. A backup you never verify is a backup you might not have.
- Billing and invoicing scripts, subscription renewals and payment reconciliation.
- Data imports and syncs between your shop, your CRM, your warehouse or a supplier feed.
- Email queues and newsletters that are sent by a scheduled worker.
- Certificate renewal jobs such as automatic SSL renewals, and cleanup jobs that keep the disk from filling up.
- The WordPress or application cron that publishes scheduled posts and runs maintenance tasks.
The free plan includes 5 heartbeat monitors, which is enough to cover the critical jobs of a typical small business or a handful of client sites.
How to set up free cron job monitoring
1. Create a free account
Sign up for My Site Alerts with your email address. There is no credit card and no trial period.
2. Create a heartbeat
Open Heartbeats in your dashboard and choose Create heartbeat. Give it a clear name, such as Nightly database backup, so an alert tells you exactly what failed.
3. Set the expected schedule and a grace period
In Expect a heartbeat every, enter how often the job runs: every 15 minutes, every hour, once a day. Then set the Grace period to roughly how long the job takes to run, plus a safety margin. A backup that runs at 2:00 and usually takes 20 minutes needs a grace period of about 30 to 40 minutes, so a slow night does not trigger a false alarm.
4. Copy your heartbeat URL
Every heartbeat has its own secret URL. Your job sends a GET or POST request to it each time it runs. You can also open the URL in your browser once to test it: the heartbeat should switch to up.
5. Choose where alerts go
Email works out of the box. You can also send alerts to Slack, Discord, Telegram, Microsoft Teams or your own webhook, so a missed run reaches the place where you actually look.
How to ping the heartbeat from your job
Linux crontab
Add the request after your command, joined with &&, so the ping is only sent when the job succeeds:
0 2 * * * /usr/local/bin/backup.sh && curl -fsS -m 10 --retry 3 https://mysitealerts.com/webhook-heartbeat/YOUR-CODE
The -m 10 option stops curl from hanging if the network is slow, and --retry 3 covers a brief connection hiccup. If your server has wget instead of curl, wget -q -O /dev/null followed by the URL does the same job.
Inside a script
Put the ping on the last line of the script, after the real work is done. In a shell script, add set -e at the top so any failing command stops the script before it reaches the ping. In Python, PHP or Node.js, make a simple HTTP request to the heartbeat URL as the final step of the job.
Hosting control panels
On shared hosting, add the same curl command to the end of the cron job in your control panel. Most panels let you paste a full command line, so the same && pattern works there too.
WordPress cron
WordPress only runs scheduled tasks when someone visits the site. For reliable scheduling, disable the built-in trigger, call wp-cron.php from a real server cron job, and add the heartbeat ping to that same line. Now you know both that the schedule fires and that it completes.
Common mistakes that cause false alarms (or missed ones)
- Pinging at the start of the job. That only proves the job started. Ping at the end, after the work succeeded.
- A grace period that is too short. Jobs get slower as data grows. Review the grace period every few months.
- Ignoring time zones. If the server clock and your schedule disagree, a daily job can look an hour late. Set the expected interval, not a wall-clock time, and let the first run start the timer.
- Pinging too often. Heartbeats are designed for jobs that run at most once a minute; extra pings within the same minute are ignored.
- Sharing one heartbeat between jobs. Each job needs its own URL, otherwise one healthy job hides another one that stopped.
- Forgetting to pause during maintenance. Pause the heartbeat while you migrate a server, so the history shows real incidents only.
Heartbeats work best next to uptime checks
Heartbeats tell you the work behind your site is happening; uptime checks tell you visitors can reach it. Together they cover both halves. If you have not set up website checks yet, follow our guide on how to monitor website uptime for free, and add SSL and domain expiry monitoring while you are there. You can check any certificate right now with the SSL checker.
It takes about five minutes to protect your most important job. Create your free account, add one heartbeat for your backup, and let us keep watch so you do not have to.
Frequently asked questions
What is the difference between cron monitoring and uptime monitoring?
Uptime monitoring checks a URL from the outside to see whether your site responds. Cron or heartbeat monitoring waits for your scheduled job to check in, and alerts you when it does not arrive on time.
Is heartbeat monitoring really free?
Yes. The free plan includes 5 heartbeat monitors with email, Slack, Discord, Telegram, Microsoft Teams and webhook alerts. There is no credit card and no trial that runs out.
Do I need to install an agent on my server?
No. Your job only needs to make one HTTP request to its heartbeat URL, for example with curl or wget, which are available on almost every server.
How long should the grace period be?
Set it to the normal run time of the job plus a safety margin. A job that usually takes 10 minutes is well served by a grace period of 15 to 20 minutes.
Can I monitor jobs that run once a day or once a week?
Yes. Set the expected interval to the schedule of the job, such as 1 day or 7 days, and you will be alerted when a run is missed.