On Tuesday 18 January 2005 1:08 pm, Hans du Plooy wrote:
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.
Probably there's a more elegant way but...I'll remove the program from the directory and I'll put a script instead (that calls the program) so I can then control stdout and stderr. LIke this: #! /bin/sh /usr/bin/program > /dev/null 2> /dev/null Now you won't get any messages (nor any error messages) in your mail. HTH, Jorge