Hi all,
I have a cron script that runs every - calls a program that analyse logs and crate graphs with the info. The way I set it up is simply to make a script that call the program, and stick it in the /etc/cron.hourly directory. Now I get a mail every hour. How do I get it not to send the mail? I know how to do this from the crontab file, but not if I use the cron.xyz directories directly.
Thanks Have you tried `script.sh 1>&2 /dev/null`? this will send stdout and stderr into the big dustbin in the sky. I dont think you will get mail from cron anymore after that (i had a similar problem with ntpdate) if you still get mails, then your script is sending them. BEWARE: those mails can be helpful if your script dies, like this you will never get any warning, so it may be better to just redirect stdout first and see if that works: `script.sh > /dev/null` - that way normal output will die, but any errors will still get mailed (as long as your
Hans du Plooy wrote: script behaves properly and writes to stdout/stderr) Hope that helps, H