mail output from user crontab

Status
Not open for further replies.

RichR

Explorer
Joined
Oct 20, 2011
Messages
77
Greetings,

I have a script that runs fine (an rsync script, but complicated because of date issues). I originally used the GUI cron window to add the job, however after looking at /etc/crontab, I realized why I wan't going to get any mail. I thought I read on a forum post that the output is sent to root, but that didn't happen.

So, I made my own cron file as my user, added it, again, it works fine (the script with cron initiating it) --- except my MAILTO:***@xx.com is being ignored, and I see nothing in /var/log/maillog.

MAILTO is a standard in the man for cron which says as long as MAILTO is set, "Overrides the default recipient for cron mail. Each crontab(5) without MAILTO explicitly set will send mail to the mailto mailbox. Sending mail will be disabled by default if mailto set to a null string, usually specified in a shell as '' or "".

What am I not getting?

SHELL=/bin/bash
TERM=dumb
MAILTO=pod1@******.com

*/10 * * * * ~pacs/scripts/******x.sh

PS Cron sending mail is standard, so why on user-added cron jobs from the GUI would the output getting mailed not be an option?

Thanks,

Rich
 
Status
Not open for further replies.
Top