Re: Output of Cron Clogging up my inbox.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>
>  0-59/1 * * * * root /usr/bin/mrtg /etc/mrtg/mrtg.cfg >/dev/null 2>/dev/null
>
>
>
>
>
> On Wed, 21 Apr 2004, Ow Mun Heng wrote:
>
>> Date: Wed, 21 Apr 2004 15:50:37 +0800
>> From: Ow Mun Heng <ow.mun.heng@xxxxxxx>
>> Reply-To: Discussion of the Fedora Legacy Project
>>     <fedora-legacy-list@xxxxxxxxxx>
>> To: "Fedora-Legacy-List (E-mail)" <fedora-legacy-list@xxxxxxxxxx>
>> Subject: Output of Cron Clogging up my inbox.
>>
>> Hi Guys,
>>
>> 	I have a cron job made for running mrtg on my adsl connection
>> at an interval of 1 minute apart. However, my ADSL conn is
>> not 24/7 turned on. So.. during the times when my PC is on, and the ASDL
>> isn't, cron still continues to run and since it can't find the ppp0
>> connection,
>> it'll output the error at a rate of 1 email per minute and I end up
>> with a clogged inbox.
>>
>> cron
>> 0-59/1 * * * * root /usr/bin/mrtg /etc/mrtg/mrtg.cfg
>>
>> I know I should add a /dev/null somewhere, I tried
>>
>>
>> 0-59/1 * * * * root /usr/bin/mrtg /etc/mrtg/mrtg.cfg 2 >&1 > /dev/null
>>
>> Both does not work.

You can also set MAILTO in the cron script:

http://www.linuxjournal.com/article.php?sid=3290
-- 
* The Digital Hermit   http://www.digitalhermit.com
* Unix and Linux Solutions   kwan@xxxxxxxxxxxxxxxxx


--

fedora-legacy-list@xxxxxxxxxx
http://www.redhat.com/mailman/listinfo/fedora-legacy-list

[Index of Archives]     [Fedora Development]     [Fedora Announce]     [Fedora Legacy Announce]     [Fedora Config]     [PAM]     [Fedora General Discussion]     [Big List of Linux Books]     [Gimp]     [Yosemite Questions]

  Powered by Linux