A cron monitor that only says “the job pinged” tells half the story. I want to know how long the backup took, and Healthchecks.io can show that if the job sends one extra ping before it starts.
curl -fsS -m 10 --retry 5 -o /dev/null https://hc-ping.com/your-uuid-here/start
/home/me/backup.sh
curl -fsS -m 10 --retry 5 -o /dev/null https://hc-ping.com/your-uuid-here
The first request appends /start to the normal ping URL. The check then shows as Started, and the run time is the gap between the start and the success ping. Healthchecks.io displays that duration only when the two events are less than 72 hours apart.
The -m 10 matters more here than on the final ping. The documentation recommends a time limit on every ping, because a stuck start ping would otherwise keep the actual job from running.
One side effect to plan for: once a check has sent a start signal, the grace time also becomes the maximum time allowed between start and success. If no success ping arrives within the grace time, Healthchecks.io marks the check as down and alerts you. A job that normally takes 40 minutes needs a grace time above 40 minutes.
If the same job can run twice at once, the durations can come out wrong, because Healthchecks.io cannot tell which success belongs to which start. Give both pings a run ID in the rid parameter. It has to be a UUID, and uuidgen makes one:
RID=$(uuidgen)
curl -fsS -m 10 --retry 5 -o /dev/null "https://hc-ping.com/your-uuid-here/start?rid=$RID"
# ... run the job ...
curl -fsS -m 10 --retry 5 -o /dev/null "https://hc-ping.com/your-uuid-here?rid=$RID"
The caveat with run IDs is that Healthchecks.io only watches the execution time of the most recently started run. A slow earlier run can overshoot the grace time without any alert. This tip follows the Healthchecks.io documentation and was not run against a live account.
Further reading: Measuring script run time, Pinging reliability tips
Going deeper: Keep a domain pointed at your home with Cloudflare DDNS on Unraid