From owner-freebsd-questions@FreeBSD.ORG Wed Aug 23 14:25:17 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org 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 AE97916A4DF for ; Wed, 23 Aug 2006 14:25:17 +0000 (UTC) (envelope-from xfb52@dial.pipex.com) Received: from smtp-out4.blueyonder.co.uk (smtp-out4.blueyonder.co.uk [195.188.213.7]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9569643D49 for ; Wed, 23 Aug 2006 14:25:15 +0000 (GMT) (envelope-from xfb52@dial.pipex.com) Received: from [172.23.170.143] (helo=anti-virus02-10) by smtp-out4.blueyonder.co.uk with smtp (Exim 4.52) id 1GFtfO-0003ef-Du; Wed, 23 Aug 2006 15:25:14 +0100 Received: from [82.41.35.166] (helo=[192.168.0.2]) by asmtp-out6.blueyonder.co.uk with esmtp (Exim 4.52) id 1GFtfK-0007eC-Oc; Wed, 23 Aug 2006 15:25:10 +0100 Message-ID: <44EC6545.1010109@dial.pipex.com> Date: Wed, 23 Aug 2006 15:25:09 +0100 From: Alex Zbyslaw User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-GB; rv:1.7.13) Gecko/20060515 X-Accept-Language: en MIME-Version: 1.0 To: Lisa Casey References: <012e01c6c6bd$29966ac0$d51a2cd0@lisac> In-Reply-To: <012e01c6c6bd$29966ac0$d51a2cd0@lisac> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: e-mail from cron X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Aug 2006 14:25:17 -0000 Lisa Casey wrote: > > # Perform daily/weekly/monthly maintenance. > 1 3 * * * root periodic daily 2>&1 | > sendmail service@jellico.com > 15 4 * * 6 root periodic weekly 2>&1 | > sendmail service@jellico.com > 30 5 1 * * root periodic monthly 2>&1 > | sendmail service@jellico.com > # > If these were standard cronjobs sending output to stdout then this would work (though I would use e.g. "mail -s 'my subject'" not sendmail - latter only really useful when you want to generate the headers yourself). However, IIRC, periodic jobs are handled differently. Extract from man periodic.conf: dir_output (path or list) What to do with the output of the scripts executed from the directory dir. If this variable is set to an absolute path name, output is logged to that file, otherwise it is taken as one or more space separated email addresses and mailed to those users. If this variable is not set or is empty, output is sent to standard output. e.g. daily_output=service@jellico.com same for weekly, monthly. Or unset all of them and use the crontab email method you used above. --Alex