Have you ever discovered that a critical process like backups or invoicing wasn't running when it should be? Dead Man's Snitch makes it quick and easy to have confidence that your cron jobs and other scheduled tasks are running how and when you need them to.
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 your crontab looks like what's below with a cron job that runs every 5 minutes.
*/5 * * * * /app/backups.sh
To monitor the cron job, we'll add a snippet to the end of the crontab line that makes a request to Dead Man's Snitch to let us know if the job ran correctly or not. Make sure to replace the Snitch's URL with the url of the Snitch you plan to monitor.
*/5 * * * * /app/backups.sh; curl -s -d s=$? https://nosnch.in/c2354d53d2
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.
Download and
install Field Agent. Then add it to the beginning of the line in your
crontab 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