I have a script that runs in cron twice every hour. My question is, when this script finds an error and sends an email on that error, and the error recovers
how do i make the script only email when there's a problem and also when there's a recovery for that problem?
simply inserting a "mail -s ....." in front of the command will send out an email with EVERY output from the script. this isn't what i need.
i want the script to send an email out to whomever i tell it to, only when an occurrence of an error is found in a file, and when that error has cleared (enough time passes and that alert didn't reoccur).
makes sense?
please help.
thank you