Cron Task Monitoring
Never let a cron silently fail again.
Crons are often forgotten until the day we discover they haven't run for weeks.
With MoniTao Heartbeat, your crons signal their successful execution. No signal = alert.
The problem with crons
Crons can stop working silently for many reasons:
- The script has an unhandled error
- The server was restarted without reactivating crons
- A permission change blocks execution
- The database or a dependent service is unavailable
The solution: Heartbeat
With MoniTao, your cron signals its execution at the end of each run. No signal = alert.
Integration example
Add a curl at the end of your crontab:
# Exemple de cron avec heartbeat MoniTao
*/5 * * * * /usr/bin/php /var/www/app/cron/cleanup.php && curl -X POST https://monitao.com/api/heartbeat/ping/YOUR_TOKEN -H "Authorization: Bearer YOUR_SECRET"
# Avec gestion d'erreur
*/5 * * * * /usr/bin/php /var/www/app/cron/cleanup.php && curl -X POST https://monitao.com/api/heartbeat/ping/YOUR_TOKEN -H "Authorization: Bearer YOUR_SECRET" || curl -X POST https://monitao.com/api/heartbeat/fail/YOUR_TOKEN -H "Authorization: Bearer YOUR_SECRET"
Use Cases
- Daily backup cron
- Log cleanup cron
- Data synchronization cron
Configuration
- Create a heartbeat job with your cron interval
- Add the provided curl at the end of your cron command
- Enable email or SMS alerts
Frequently Asked Questions
How to configure the heartbeat interval?
The interval should match your cron frequency (e.g., 24h for a daily cron).
What if my cron fails sometimes?
Use the /fail endpoint to explicitly signal a failure and receive an alert.
Can I monitor multiple crons?
Yes, create a separate heartbeat job for each cron to monitor.
Does heartbeat add latency to my cron?
The HTTP ping takes a few milliseconds, negligible for most crons.
Useful Links
Ready to Sleep Soundly?
Start free, no credit card required.