Learn how to setup Heartbeats (Cron / Scheduled jobs)
What it does: Confirms cron jobs and background workers are running. Each job pings a unique URL within an expected interval.
Quick setup
- Go to Heartbeats → Create heartbeat.
- Set a name, expected frequency (e.g., every 15 min), and copy the unique ping URL.
- Add a request to the URL at the end of your job.
Examples
# Cron every 15 minutes
*/15 * * * * curl -fsS --retry 3 https://uptimer24.com/api/heartbeat/XXXXXXXX >/dev/null
# Node.js
await fetch('https://uptimer24.com/api/heartbeat/XXXXXXXX', {method:'POST'})
Best practices
- Set expected interval slightly longer than the job schedule to allow execution time.
- Ping on success; optionally ping a fail URL when errors occur.
Troubleshooting
- No heartbeat? Ensure the job actually runs and outbound HTTPS is allowed.
- High variance jobs → configure a wider grace period to avoid false alerts.