Re: cron and MAILTO

2011-12-19 Thread Raf Czlonka
On Mon, Dec 19, 2011 at 03:34:27PM GMT, T o n g wrote: > On Mon, 19 Dec 2011 09:09:19 +, Raf Czlonka wrote: > > > % man 5 crontab > > I guess I assumed someone would be thoughtful enough to find out in OP > that I said I know it works for crontab. File in /etc/cron.d ARE crontabs and the ma

Re: cron and MAILTO

2011-12-19 Thread Bob Proulx
T o n g wrote: > 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" Since this job is run by user1 then all mail goes to user1. > 01 * 19 07 * user2 echo "This command is run hourly on the 19th of July" S

Re: cron and MAILTO

2011-12-19 Thread Raf Czlonka
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

Re: cron and MAILTO

2011-12-18 Thread T o n g
Thanks for your answer Bob. On Sun, 18 Dec 2011 21:38:05 -0700, Bob Proulx wrote: >> I know normally cron will send emails to whoever the job is owned/ >> launched by, but if I put a MAILTO at the top of the file, will all >> emails be then sent to my designated MAILTO user id, instead of to >> d

Re: cron and MAILTO

2011-12-18 Thread Bob Proulx
T o n g wrote: > How does cron decide whom the email will send to? It sends mail to the owner of the crontab. Who's crontab are you talking about? /etc/crontab<= root crontabs BSD style /etc/cron.d/* <= system crontabs Vixie Cron style /var/spool/cron/crontab