Re: cron and MAILTO
- From: Raf Czlonka <rjc@xxxxxxxxxxxxx>
- Date: Mon, 19 Dec 2011 09:09:19 +0000
On Mon, Dec 19, 2011 at 05:32:44AM GMT, T o n g wrote:
Let me explain with an example.
Say I have a file under /etc/cron.d/ with the following entry:
42 4 1 * * user1 echo "This command is run 4:42 am every 1st of the month"
01 * 19 07 * user2 echo "This command is run hourly on the 19th of July"
Usually, when the jobs do get fired up, each user receives the
corresponding message in their email.
Now, if I put 'MAILTO=user3' at the top of the file, what will happen?
It would've been quicker if you had tested it yourself or RTFM.
% man 5 crontab
In addition to LOGNAME, HOME, and SHELL, cron(8) will look at MAILTO
if it has any reason to send mail as a result of running commands in
``this'' crontab.
If MAILTO is defined (and non-empty), mail is sent to the user so
named. MAILTO may also be used to direct mail to multiple recipients
by separating recipient users with a comma. If MAILTO is defined but
empty (MAILTO=""), no mail will be sent. Otherwise mail is sent to
the owner of the crontab.
Regards,
--
Raf
--
To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx
with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx
Archive: http://lists.debian.org/20111219090918.GA31932@xxxxxxxxxxxxx
- Follow-Ups:
- Re: cron and MAILTO
- From: T o n g
- Re: cron and MAILTO
- References:
- cron and MAILTO
- From: T o n g
- Re: cron and MAILTO
- From: Bob Proulx
- Re: cron and MAILTO
- From: T o n g
- cron and MAILTO
- Prev by Date: Re: Strange disk performance issue
- Next by Date: Re: what's the best media player ?
- Previous by thread: Re: cron and MAILTO
- Next by thread: Re: cron and MAILTO
- Index(es):
Relevant Pages
|