From owner-freebsd-questions@FreeBSD.ORG  Mon Apr  7 13:54:54 2008
Return-Path: <owner-freebsd-questions@FreeBSD.ORG>
Delivered-To: freebsd-questions@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 051041065678
	for <freebsd-questions@freebsd.org>;
	Mon,  7 Apr 2008 13:54:54 +0000 (UTC)
	(envelope-from d.hill@yournetplus.com)
Received: from duane.dbq.yournetplus.com (duane.dbq.yournetplus.com
	[65.124.230.214])
	by mx1.freebsd.org (Postfix) with ESMTP id D19008FC2E
	for <freebsd-questions@freebsd.org>;
	Mon,  7 Apr 2008 13:54:53 +0000 (UTC)
	(envelope-from d.hill@yournetplus.com)
Received: by duane.dbq.yournetplus.com (Postfix, from userid 1001)
	id D2BAF27E461; Mon,  7 Apr 2008 13:54:52 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
	by duane.dbq.yournetplus.com (Postfix) with ESMTP id CB41527E45F;
	Mon,  7 Apr 2008 13:54:52 +0000 (UTC)
Date: Mon, 7 Apr 2008 13:54:52 +0000 (UTC)
From: D Hill <d.hill@yournetplus.com>
X-X-Sender: d.hill@duane.dbq.yournetplus.com
To: Lowell Gilbert <freebsd-questions-local@be-well.ilk.org>
In-Reply-To: <44iqytn5sf.fsf@be-well.ilk.org>
Message-ID: <alpine.BSF.1.10.0804071351190.72128@duane.dbq.yournetplus.com>
References: <alpine.BSF.1.10.0804042327290.20308@duane.dbq.yournetplus.com>
	<44iqytn5sf.fsf@be-well.ilk.org>
User-Agent: Alpine 1.10 (BSF 962 2008-03-14)
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
Cc: freebsd-questions@freebsd.org
Subject: Re: [freebsd-questions] cronjob - email messages sent
X-BeenThere: freebsd-questions@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: User questions <freebsd-questions.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-questions>, 
	<mailto:freebsd-questions-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-questions>
List-Post: <mailto:freebsd-questions@freebsd.org>
List-Help: <mailto:freebsd-questions-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-questions>, 
	<mailto:freebsd-questions-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 07 Apr 2008 13:54:54 -0000

On Mon, 7 Apr 2008 at 09:38 -0400, freebsd-questions-local@be-well.ilk.org...:

> D Hill <d.hill@yournetplus.com> writes:
>
>> I have several cronjob's set up on a server we have under the user root. I
>> need to specify specific email addresses results are sent to.
>>
>> Using documentation from:
>>
>>   man 5 crontab
>>
>> I thought I could surround the jobs:
>>
>>   ...
>>   MAILTO="root,someoneelse"
>>   @hourly /usr/local/bin/mysqladmin -u internalonly status
>>   30 8 * * * /usr/local/bin/mysql -u internalonly < /root/mysql.optimize
>>   */15 * * * * mysql -u internalonly < /root/delete_rad_usersonline
>>   0 */4 * * * mysql -u internalonly < /root/delete_rad_authlog_failed
>>   MAILTO="root"
>>   ...
>>
>> It works for @hourly, but not for the other three.
>
> I don't have a chance to look into it now, but it should definitely
> work the way you have done it.  [I usually invoke sendmail directly on
> the crontab line if I want mail output, so I haven't any experience to
> draw on here.]
>
> You might want to check whether the order of the schedule lines matters.

It is working. Checking the man page for cron:

   %man cron
   ...
   The cron utility then wakes up every minute, examining all stored
   crontabs, checking each command to see if it should be run in the
   current minute.

>From this, I gathered they were read from top to bottom.