Cron Job Heartbeat Tester
Test that your cron job or scheduled script can send a heartbeat. Click Start to get a temporary URL, ping it with curl or wget, and watch each ping arrive live with its time, method and source IP.
- Free
- No signup required
- Live ping log
Get a temporary URL, point your cron job at it, and watch every ping arrive.
Common cron job heartbeat problems
No ping arrives
The job did not run, or curl is not on the PATH cron uses. Cron runs with a minimal environment, so use the full path (/usr/bin/curl) and check the cron log (grep CRON /var/log/syslog on Debian and Ubuntu).
The ping is sent before the job finishes
Putting curl at the start, or joining it with ; instead of &&, sends the heartbeat even when the job fails. Use job && curl ... so the ping only goes out after success.
Outbound requests are blocked
A firewall, proxy or locked-down container may block outgoing HTTPS. Test with the same user and network the job runs in, and check proxy settings such as HTTPS_PROXY.
The job runs at a different time than expected
Cron uses the server's time zone, which is often UTC. The gap between pings shown here tells you the real interval.
Pings arrive twice
The job is scheduled on two servers, in two crontabs, or retried by a wrapper. Check the source IP of each ping to see where they come from.
curl hangs and the job never finishes
Without a timeout, a network problem can stall the job. Add --max-time 10 and --retry 3 so a heartbeat never blocks the real work.
How to test a cron job heartbeat
- Click Start test to get a unique URL. It works for 15 minutes.
- Add a request to the end of your job, for example: && curl -fsS --max-time 10 <URL>.
- Run the job, or wait for cron to run it.
- Watch the ping appear with its time, method, source IP and the gap since the previous ping.
What is a heartbeat monitor?
A heartbeat monitor watches something that runs on its own, such as a cron job, a backup script or a queue worker. Instead of the monitor checking the job, the job checks in: each time it finishes, it sends a request to a unique URL.
If a check-in does not arrive on time, something went wrong. The server may be off, the crontab may have been lost in a migration, the script may fail before the end, or the job may hang. None of these produce an error you would see, which is why silent cron failures often go unnoticed for weeks.
TinyPing's heartbeat monitor expects a ping every interval (5, 15 or 30 minutes, 1 hour, 6 hours or 1 day) plus a grace period. When the last ping is older than that, an incident opens and you are alerted. This tester lets you check the ping part works before you rely on it.
# Nightly backup at 02:00, ping only if it succeeds 0 2 * * * /usr/local/bin/backup.sh && curl -fsS --max-time 10 --retry 3 https://<heartbeat-url> > /dev/null
When to use a heartbeat tester
Database backups
Make sure a nightly pg_dump or mysqldump script can reach the internet and sends its ping only after the dump succeeds.
Scheduled tasks in the cloud
Test pings from GitHub Actions schedules, Kubernetes CronJobs, AWS Lambda on a schedule or Vercel cron before you set up a monitor.
Windows Task Scheduler
Check that a PowerShell Invoke-WebRequest or curl.exe call at the end of a scheduled task actually goes out.
WordPress and cPanel cron
Confirm a cPanel cron job runs on the schedule you set by watching the gap between pings.
Check something else
- Port CheckerCheck if a TCP port is open, closed or filtered on a host, with the connect time.
- Website Down CheckerCheck if a website is down for everyone or just you, with status code, response time and final URL.
- Uptime SLA CalculatorTurn an uptime percentage into allowed downtime per day, week, month, quarter and year, or downtime into a percentage.
- Website Response Time TestMeasure how long a website takes to respond, split into DNS, connect, TLS, server wait and download.
Frequently asked questions
How long does the test URL work?
15 minutes from when you click Start. For permanent use, create a heartbeat monitor, which gives you a URL that does not expire.
Which HTTP methods can I use?
GET, POST or HEAD all count as a ping. Use whatever is easiest from your script: curl, wget, PowerShell or an HTTP library.
How do I ping from a cron job?
Add && curl -fsS --max-time 10 <URL> > /dev/null to the end of the line in your crontab. The && makes sure the ping is only sent when the job succeeded.
What is the grace period?
Extra time added to the interval before a missing ping counts as a failure. It covers jobs that take a little longer some days, so you are not alerted for a few minutes of delay.
Can I see where the ping came from?
Yes. Each ping shows the source IP and user agent, which helps when the same job might run on more than one server.
Will I get alerted if my job stops running?
Not by this test. A TinyPing heartbeat monitor alerts you by email, Slack, webhook or Google Chat when a ping is late by more than the interval plus grace, and again when pings resume.
Silent failures are the worst kind
A cron job that stops running produces no error to notice. A TinyPing heartbeat monitor expects a ping every 5 minutes up to once a day and alerts you when:
- the job does not run on schedule
- the job fails before it sends its ping
- the server running it goes offline
US$6.99 a month or US$47 a year per 50 monitors, team members free. 7-day free trial, no card needed.
Want alerts in team chat? Follow the guide for Slack or Google Chat.