Heartbeat pings
Know when a cron job stops running.
- Create the monitor. Add a monitor of type Heartbeat. See Heartbeat.
- Set period and grace. Period is how often the job should run. Grace is the extra time allowed before the monitor fails.
- Copy the ping URL. It is shown on the monitor page.
- Call it from the job. Add a request at the end of the job, for example in a crontab:
0 3 * * * /usr/local/bin/backup.sh && curl -fsS -m 10 --retry 3 https://uptiva.linuxmaster.cloud/api/heartbeat/YOUR_TOKENReporting failure
Request the same URL with /fail added at the end to mark the job as failed right away.
Copy the exact URLs from the monitor page. If no ping arrives within period plus grace, you are alerted.