How to get alerted if my background job dies

Arm a watchdog with a deadline and an alert URL. Silence past the deadline triggers the alert.

Run it

curl -s -X POST https://api.model.tools/api/v1/watchdog -H 'Content-Type: application/json' -d '{"id":"nightly","alert_url":"https://my-host/alert","deadline_sec":300}'

Response

{"ok":true,"id":"nightly","state":"armed","ping_url":"…/watchdog/nightly/ping"}