Ask HN: Python Wrapper for Cronjobs

1 points by maest ↗ HN
I currently have a Python script I used to notify me whenever my cronjobs fail. My crontab looks like this:

  0 0 * * * job_monitor.py --to user@email --cmd my_cron_script.sh
The script is quite useful - it automatically emails any WARN or ERROR messages or cases where exit code is not 0 - but it's also sort of janky and feature limited.

This feels like it should be a common use-case, but I can't seem to find any open source libraries for this. This usually means one of two things: 1. I'm googling for the wrong thing 2. my approach is somehow wrong.

Are there any Python (or otherwise) tools that provide this behaviour?

1 comment

[ 3.0 ms ] story [ 26.4 ms ] thread
Can't you just dispense with job_monitor.py altogether and just use the MAILTO facility?