Short version: Is there an off-the-shelf program to avoid being pinged repeatedly be frequent cron jobs in periods when they fail? I have a custom implementation but it seems like something someone would have dealt with already.I have a script on my home server to fetch my mail from my ISP server to store locally. More often than I'd like, Comcast goes down for an hour or so and I get dozens of messages from cron (one every two minutes) reporting that fetchmail failed. I set up a script to read the output of the cron job (blank on success) and always put it into a log file, but only put it to stdout -- and, therefore, my email -- if it's been at least 20 minutes since the last error occurred.I can't be the only sysadmin with this issue. In short, the job runs frequently and I only want periodic updates while it's failing, not a constant stream of errors. Is there an off-the-shelf solution that I've missed?Script is as follows; As you can see it's pretty basic, e.g. no indication when the errors stop:#!/bin/bashlogpath=/var/log/$1.logminutes=$2latestlogpath=${logpath}.latestcat >> ${latestlogpath}([ ! -e ${logpath} ] || [[ $(date +%s -r ${logpath}) -lt $(date +%s --date=${minutes} min ago) ]] ) && {  cat ${latestlogpath}  cat ${latestlogpath} >> ${logpath}  rm ${latestlogpath}}
Program/script to limit cronjob output
cron;logs