Title: | DIGITAL UNIX (FORMERLY KNOWN AS DEC OSF/1) |
Notice: | Welcome to the Digital UNIX Conference |
Moderator: | SMURF::DENHAM |
Created: | Thu Mar 16 1995 |
Last Modified: | Fri Jun 06 1997 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 10068 |
Total number of notes: | 35879 |
I run several cron jobs overnight, which I've set up using the crontab command. The cron jobs have been working flawlessly for months. On other UNIXes, the output from the commands were then mailed to me (not root). On Digital UNIX V4.0, the cron output is mailed to root. It's not that I miss the mail. In fact, I used to set up my elm filter to redirect it away from my inbox. The problem is that the root mail file gets extremely large (several megabytes when I found it earlier this week). Is this correct behavior? How can I get the cron job to mail *me* the output or not mail it at all? Thanks, -Jeff
T.R | Title | User | Personal Name | Date | Lines |
---|---|---|---|---|---|
8581.1 | /.forward | APACHE::CHAMBERS | Tue Jan 28 1997 16:03 | 5 | |
Easy - just put your email address into a file called "/.forward", and when cron tries sending it to root, the mailer will bounce it to you. This is assuming that root's home directory is /, of course. If it's some other directory, put the .forward file there. | |||||
8581.2 | try >/dev/null | USMV01::DOUCETTE | Use your judgement | Wed Jan 29 1997 12:07 | 3 |
I seem to remember that you can put >/dev/null at the end of your entry in the cron file and no mail will be sent. Been a while... | |||||
8581.3 | APACHE::CHAMBERS | Thu Jan 30 1997 11:16 | 10 | ||
> ... you can put >/dev/null at the end of your > entry in the cron file and no mail will be sent. Been a while... Close. You usually need ">/dev/null 2>&1", to suppress both stdout and stderr. Most of the messages that cron emails to root contain error messages, and usually they were written to stderr. Of course, this assumes that you want to suppress the mail entirely rather than send it to someone who might try to correct the problems. |