CronNudge

Linux crontab

Run the command, capture the exit code, then curl the ping URL. Pass the code so a failed backup is a fail ping, not a success.

# crontab -e
0 3 * * * /usr/local/bin/backup.sh
code=$?
curl -fsS -m 10 --retry 3 "$CRONNUDGE_URL?exit=$code"
exit $code

Longer guide: Crontab not running · Daylight saving time · Render, Railway, and Fly.io · whenever and Rails jobs · Cron in Docker · Cron logs · Slack and Discord alerts · Environment variables · Stuck or hanging jobs