Firts of all, sorry fo my poor english, but i hope you'll undestand me
Ok, let's go to the problem....
I have a lot of awstats crontabs, and i have one mail,where i get daily and weekly output of all servers that i administrate, now it's problem that i get to his mail every time, when crontab for awstats is started.
I was searching on google so long, but i did't find any fine solution too me, because i don't want to use this in the end of crontab -> CRON >/dev/null 2>&1
because this will email me only if file won't exist anymore.
Finally, i want that crontab for awstats send me email just in case if awstats don't update correcly.
Test it. Run awstats and force an error condition (one way is to kill the process from another terminal). Then in the command prompt after awstats returns, run
echo $?
If it exited with a non-zero, cron will email you. Make sure cron CAN email you.