From owner-freebsd-questions@FreeBSD.ORG Wed Nov 26 11:22:52 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0DB6A16A4CE for ; Wed, 26 Nov 2003 11:22:52 -0800 (PST) Received: from mta10.adelphia.net (mta10.adelphia.net [68.168.78.202]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7C2E043FBF for ; Wed, 26 Nov 2003 11:22:50 -0800 (PST) (envelope-from xela@battleface.com) Received: from battleface.com ([24.52.31.3]) by mta13.adelphia.net (InterMail vM.5.01.06.05 201-253-122-130-105-20030824) with ESMTP id <20031126191720.SSVB4878.mta13.adelphia.net@battleface.com>; Wed, 26 Nov 2003 14:17:20 -0500 Date: Wed, 26 Nov 2003 14:17:19 -0500 Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v552) To: Chris From: Alex (ander Sendzimir) In-Reply-To: <3FC4E92A.2030602@makeworld.com> Message-Id: <27472A3A-2045-11D8-A099-000A95775140@battleface.com> Content-Transfer-Encoding: 7bit X-Mailer: Apple Mail (2.552) cc: freebsd-questions@freebsd.org Subject: Re: crontab X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Nov 2003 19:22:52 -0000 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: >> stuart.gibson@bridgeman.co.uk 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 > > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to > "freebsd-questions-unsubscribe@freebsd.org" > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Alexander Sendzimir 802 863 5502 Mac Tutor of Vermont, LLC info @ mactutor . vt . us Colchester, VT 05446