Heartbeats
Monitor cron jobs and scheduled tasks with ping-based checks
What are heartbeats?
Heartbeats monitor things that should happen on a schedule — cron jobs, batch processes, backup scripts. Instead of ThunderHooks checking a URL, your job pings ThunderHooks. If the ping doesn't arrive on time, you get alerted.
How it works
- Create a heartbeat monitor with an expected interval
- ThunderHooks gives you a unique ping URL
- Add a ping to the end of your cron job
- If the ping stops arriving, ThunderHooks alerts you
Creating a heartbeat
Go to Monitoring > Heartbeats and click New Heartbeat:
- Name — what this job does (e.g. "Nightly DB Backup")
- Expected period — how often the ping should arrive, in seconds (e.g.
86400for daily) - Grace period — extra time before marking as missed (buffer for slow jobs)
- Alert after N misses — consecutive missed pings before alerting
Pinging
Add a simple HTTP request to the end of your script:
# At the end of your cron job
curl -s https://thunderhooks.com/ping/your-slug
Any HTTP method works — GET, POST, HEAD. The slug is unique to your heartbeat monitor.
You can also signal failure explicitly:
# If the job failed
curl -s https://thunderhooks.com/ping/your-slug/fail
Ping history
The heartbeat detail page shows all received pings with timestamps, source IPs, and any body content your script sent.
Alerts
Same alert options as monitors:
- Alert email — email notification on missed heartbeats
- Alert webhook URL — POST notification with failure details
Pause and resume
You can pause a heartbeat during maintenance windows. While paused, missed pings won't trigger alerts.