We weren't talking about changing scripts, just modifying it slightly so it only sends a mail on failure.
I doubt cron changed, it's possible the script is now outputting a blank line where it wasn't before. That would result in apparently empty emails where none were generated before.
You could change the cron line to do something like:
This will output the string ERROR if the script exits with an error, and will only send email if there is either an error or the output file is non-empty or both. The output file must have more than just blank lines to be considered non-empty. This will only help if the reason why they're receiving an empty email is that there is a blank line in it, and you haven't shown us the email so we don't know that for sure, but it's a reasonable guess as previously no emails were being generated and now they are.Code:scriptname >output 2>&1 || echo ERROR $?; grep -q . output && cat output
Probably you'll need to either do some reading on this, or get some help scripting if this doesn't work.



LinkBack URL
About LinkBacks
Reply With Quote







