Re: Setting MAILTO to various address in the same crontab?
On Wednesday 22 June 2005 12:00, Andy Smith wrote:
> On Wed, Jun 22, 2005 at 10:58:42AM +0100, Adam Funk wrote:
>> If I want the output of various cron jobs sent to more than one
>> e-mail address, is there anything wrong with doing the following?
>>
>> # beginning of crontab
>> */10 * * * * /path/to/job0
>> MAILTO=address1@example.com
>> 02 03 * * * /path/to/job1
>> 03 04 5 * * /path/to/job2
>> MAILTO=address2@example.net
>> 06 07 * * * /path/to/job3
>> # end of crontab
>>
>> Experimentation suggests that it works, but are there any pitfalls?
>
> No, that is how you're supposed to do it.
Thanks.
Another thing I was wondering: is it possible to change the mailing
address for one at job?
Reply to: