Project

General

Profile

Feature #1259

mail output from user crontab

Added by Rich Rosenbaum over 9 years ago. Updated almost 9 years ago.

Status:
Closed
Priority:
Nice to have
Assignee:
William Grzybowski
Category:
Middleware
Target version:
Estimated time:
Severity:
New
Reason for Closing:
Reason for Blocked:
Needs QA:
Yes
Needs Doc:
Yes
Needs Merging:
Yes
Needs Automation:
No
Support Suite Ticket:
n/a
Hardware Configuration:

Description

Greetings,

I have a BASH 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 (FreeBSD) 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

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

William Grzybowski wrote "Because by default the output is redirected to /dev/null" Does this statement mean the output of the script? What redirects it?

Thank you very much,

Rich

History

#1 Updated by William Grzybowski almost 9 years ago

This should have been fixed in r11855

Also available in: Atom PDF