Dead Man's Snitch makes it easy to monitor cron jobs and get alerted when they error or fail to run. The fastest way to get started is to use a command line HTTP client like curl to notify Dead Man's Snitch when your cron job runs. We recommend using Field Agent, our custom reporting agent, as it opens up new ways of debugging issues that help reduce the mean time to recovery (MTTR).
Let's say you have the below cron job that runs every 5 minutes.
5 * * * * /app/backups.sh
To monitor this cron job add curl with the Snitch's unique URL after the job definition like so:
5 * * * * /app/backups.sh; curl -s https://nosnch.in/c2354d53d2?s=$?
Field Agent wraps your job, gathers extra data and metrics, and sends that data along with your check-in. This opens up new possibilities like accessing your job's error logs to get problems resolved faster. We recommend everyone use Field Agent, though some features will only be available on supporting plans.
install Field Agent. Then, add it to your cron job line like below, using
your Snitch's unique token. It's best to use the full path to the
dms binary as it helps to avoid PATH issues.
5 * * * * /path/to/dms c2354d53d2 /app/backups.sh