Have you checked out /etc/defaults/periodic.conf?


On Wednesday, November 26, 2003, at 12:55 PM, Chris wrote:


Kevin D. Kinsey, DaleCo, S.P. wrote:
[EMAIL PROTECTED] wrote:
Hi,

I have a number of scripts that run every night using a crontab. In my crontab file I'm using the MAILTO flag to get cron to email me every time it runs which results in a lot of emails.

Is there any way of instructing cron to only email me if the cron job fails?

regards

Stuart Gibson


Sure!
Redirect stderror to /dev/null:
/bin/sh /home/me/myscript > /dev/null
And this one won't mail you, whether it errors
or not....
/bin/sh /home/me/myscript > /dev/null 2>&1
Kevin Kinsey
DaleCo, S.P.

Very cool! Now, what if you do the same, but instead of the normal crons, can something like this be done with the /etc/periodic/daily, weekly, and monthly routines?


--
Best regards,
                 Chris
______________________________________________________________________

PGP Fingerprint = D976 2575 D0B4 E4B0 45CC AA09 0F93 FF80 C01B C363

PGP Mail encouraged / preferred - keys available on common key servers
______________________________________________________________________
       01010010011000010110001101100101011100100101100000000000

_______________________________________________
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"




- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -


Alexander Sendzimir                             802 863 5502
 Mac Tutor of Vermont, LLC         info @ mactutor . vt . us
  Colchester, VT 05446

_______________________________________________
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to