Monitoring python cron jobs with Babis
Over at MozMeao we are using APScheduler to schedule the execution of periodic tasks, like Django management tasks to clear sessions or to fetch new job listings for Mozilla Careers website.
A couple of services provide monitoring of cron job execution including HealthChecks.io and DeadManSnitch. The idea is that you ping a URL after the successful run of the cron job. If the service does not receive a ping within a predefined time window then it triggers notifications to let you know.
With shell scripts this is as simple as running curl
after your command:
$ ./manage.py clearsessions && curl …