If you are looking for a simple one-ping implementation to receive notifications based on whether your job has or hasn't run, you can create a heartbeat monitor instead of the more specific cron job monitor.
has completed. To be alerted if your job has not completed at least once in the last hour, add
complete endpoint not pinged in 1 hour. Multiple rules can be added and will be combined with an implied OR
/runping, you should ping the /run endpoint before your job, and if your rules reference
/completeyou should ping the /complete endpoint after your job.
Has Run and Has Completed rules provide an easy, modern alternative to crontab emails. These rules can be used to share the status and optional
?msg of a job to Slack, HipChat, Email, SMS, etc. Notification rules are useful on their own or combined with other rule
types as a building blocks of your monitoring plan.
/runendpoint before your job and your
/completeendpoint after. A missing or misplaced
/completeping is the most common integration mistake.
If you've verified that you're pinging
/complete appropriately, try changing the logic in your
&& "and" logic to
; "or" logic.
Switch from only pinging
/complete if your command finishes successfully:
* */2 * * * curl -m 10 https://cronitor.link/d3x0/run ; /path/to/db_backup.sh && curl -m 10 https://cronitor.link/d3x0/complete
To always pinging your
* */2 * * * curl -m 10 https://cronitor.link/d3x0/run ; /path/to/db_backup.sh ; curl -m 10 https://cronitor.link/d3x0/complete
By changing to
; you will ping your Cronitor URL even if your command exits with a non-zero
exit code. If this works, you should investigate why your command is exiting with an error code.