As a long time CentOS user, I’ve always winced when I took ownership of new systems with e-mail notifications enabled. Whether this was through setting MAILTO to a distribution list, or using the default and sending it to the user who created the job. Having cron send mail has woken me up more than once when /var/spool/* filled up. Give the awesome searching capabilites that come with solutions like Elasticsearch, Loki, and Gray log, I now turn cron mailing off on all of my systems. You can disable cron mail on CentOS by adding the “-s -m off” options to the CRONDARGS variable in /etc/sysconfig/crond:
CRONDARGS=-s -m off
I currently have an awesome dashboard to show job status, and get notified through actionable channels when critical jobs fail. While the vast majority of my scheduled activities use Kubernetes Jobs, I still have a few outliers that use crond. This has drastically reduced the number of messages I receive through e-mail, and allowed me to get true alerting wrapper around mission critical stuff. Curious how many folks still use e-mail for notifications?