Email Alert Cron Failed
Get notified by email when a scheduled task doesn't run as expected.
Crons are silent by nature. When they fail, nobody knows... until a customer complains that their data hasn't been updated or their invoice wasn't generated.
With MoniTao, each critical cron sends a heartbeat after execution. If the heartbeat doesn't arrive, an email alert is triggered to notify you of the failure.
Why Alert on Cron Failures
- Critical tasks: Backups, report generation, data synchronization - these tasks must run.
- Silent failure: A cron that doesn't run often generates no log. Impossible to detect without external monitoring.
- Delayed effects: The impact of a missed cron may not be visible for hours or days.
Cron Alert Content
- Cron identifier: The name or ID of the task that should have run.
- Last heartbeat: When the cron last ran successfully.
- Exceeded delay: How late the expected heartbeat is.
Detected Failure Types
- Cron not executed: The cron didn't start at all (crontab issue, server down).
- Cron crashed: The cron started but stopped before sending the heartbeat (crash, timeout).
- Cron too slow: The cron takes longer than expected (configure an appropriate grace period).
Frequently Asked Questions
How do I configure a cron to send a heartbeat?
Add a simple curl at the end of your script: curl -s https://monitao.com/ping/your-id
What grace period should I configure?
Allow margin for duration variations. A 5-minute cron should have 10-15 minutes of grace.
Can I be alerted if a cron takes too long?
Yes, configure a maximum timeout in addition to the grace period.
Does the alert indicate why the cron failed?
MoniTao indicates that the heartbeat didn't arrive. For error details, check the server logs.
Useful Links
Ready to Sleep Soundly?
Start free, no credit card required.