Watch a cron job
A cron job that stops running doesn't send an error. It just stops, and you find out when you need the backup. A vital turns that silence into a page: the job checks in when it finishes, and a missed check-in is the alert.
This takes two minutes and works on Free.
1. Make a vital
In the web app, Vitals, then New vital. Give it a name, backups, and say how often the job runs: every hour, every day, or a crontab line like 0 3 * * * with its time zone. Give it some grace: how late is still fine. A backup that usually takes four minutes and sometimes twenty wants twenty minutes of grace, not five.
It hands you a URL and the line to paste.
2. Add one line to the job
Put the check-in on the end of the crontab entry, after &&, so it only runs when the job succeeded:
0 3 * * * /usr/local/bin/backup.sh && curl -fsS -m 10 --retry 3 https://mast.tissue.dev/mk_0c47e2a91dA failed backup, a cron daemon that died and a box that's powered off are all the same thing now: one missing check-in, and one page.
3. Check it
Run the job by hand once. The vital's row shows the beat and when the next one is due. If you have Mast Pager on your phone, the dot for backups on the wall at the top of the feed turns green.
Telling it the job failed
A job that knows it failed doesn't have to wait to be missed. Send its exit status and Tissue Mast pages at once, with the code on the card:
0 3 * * * /usr/local/bin/backup.sh; curl -fsS -m 10 https://mast.tissue.dev/mk_0c47e2a91d/$?/0 is a clean run and anything else is a failure. Run signals adds a start signal too, so a run that hangs is caught before the next one is due, and Vitals has schedules, run limits, GitHub Actions and Cells.