From owner-freebsd-questions@FreeBSD.ORG Wed Aug 23 17:54:58 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 97DFB16A4E5 for ; Wed, 23 Aug 2006 17:54:58 +0000 (UTC) (envelope-from dking@ketralnis.com) Received: from ketralnis.com (melchoir.ketralnis.com [68.183.67.83]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4F2BD43D6D for ; Wed, 23 Aug 2006 17:54:58 +0000 (GMT) (envelope-from dking@ketralnis.com) Received: from [192.168.1.80] (pix.xythos.com [64.154.218.194]) (authenticated bits=0) by ketralnis.com (8.13.6/8.13.6) with ESMTP id k7NHsv5m037598 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NO) for ; Wed, 23 Aug 2006 10:54:57 -0700 (PDT) (envelope-from dking@ketralnis.com) Mime-Version: 1.0 (Apple Message framework v752.2) In-Reply-To: <20060823162301.9cf362fa.albi@scii.nl> References: <012e01c6c6bd$29966ac0$d51a2cd0@lisac> <20060823162301.9cf362fa.albi@scii.nl> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: David King Date: Wed, 23 Aug 2006 10:54:40 -0700 To: freebsd-questions@freebsd.org X-Mailer: Apple Mail (2.752.2) 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 17:54:58 -0000 >> 30 5 1 * * root periodic monthly 2>&1 >> | sendmail service@jellico.com >> but all I get is a blank email sent to service@jellico.com > [...] > also.. using 2>&1 doesn't seem appropriate, afaik you would use > that in > crontab if you don't want to get emails via cron You would use "2>&1" in conjunction with ">/dev/null" if you didn't want to get emails from cron, sure. But if you don't redirect stderr, then stderr doesn't end up in the mail. That is, if "periodic monthly" outputs stdout and stderr, and you only redirect (with "|") stdout, then you don't get the stderr. "2>&1" says, "send output from file-descriptor 2 (stderr) to file- descriptor 1 (stdout)". That way the redirection with the pipe contains both stdout and stderr. As far as redirecting the periodic output to a different user, set "daily_output" in /etc/periodic.conf. See /etc/defaults/periodic.conf for an example. You'd of course have to do the same for weekly and monthly.