A heartbeat works the other way around from a monitor: your job contacts Uptimecheck each time it runs. If the request does not arrive on time, you get an alert.
Heartbeats are ideal for backups, nightly imports, queue workers and anything else that runs on a schedule without anyone watching.
Create a heartbeat
- Log in to your Uptimecheck account.
- Open Heartbeats and choose Create heartbeat.
- Give it a name and set how often a request is expected, in minutes, hours or days.
- Set a grace period: roughly how long the job takes to run, so a slow run is not reported as missed.
- Save it and copy the heartbeat URL.
Call the URL from your job
Add a GET or POST request to the heartbeat URL at the end of your job, for example with cURL in a crontab:
0 2 * * * /usr/local/bin/backup.sh && curl -fsS https://your-heartbeat-url
Placing the request after the job, joined with &&, means it is only sent when the job succeeds.
Copy the exact heartbeat URL from your account; the example above is a placeholder.
More on cron job monitoring, and how to monitor cron jobs with heartbeats.