My goal is to join an existing production engineering team and find zero cron generated emails in the team mailing lists. This project is not intended to have a production ready solution, but more of a calls-to-arms to stop the emails!
Cron is default batch job schedule used on POSIX based systems. Cron's secondary function is to generate thousands of unread emails.
- Crontabs are odd to maintain.
- Missing feature to only store job output when there is an execution error.
- Missing feature to enforce some kinda primitive job ordering.
- Using emails, to alert on job failures, does not scale to lots of machines and is often a source of toil.
Use the periodic utility, instead of cron. This will provide the missing features:
- Only store job output when there is an execution error -- see man periodic.conf
- Enforce some kinda primitive job ordering -- scripts are run in lexicographical order.
- Emails can be turned off -- see man periodic.conf
Use some extra scripts to:
- enforce a global serial execution ordering
- reports job execution status to the Prometheus monitoring system
- use a configuration vector to indicate if a job is enabled or disable