|
Home > Archive > Unix questions > February 2006 > Question about cron emails
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Question about cron emails
|
|
| vas117@psu.edu 2006-02-06, 5:56 pm |
| I have a cron job running as root. The Output from "cron" command
email is being sent to root (which is our system admin and not me). I
would like to receive these emails as well. I've tried to pipe the
output to mail so that I can get this output (as in the below cron
entry), but all I get is a blank email sent to that address that has
"Test" as the subject. I don't see any of the output that is sent to
the root user in the "Output from "cron" command" email. Can someone
please help me figure this one out? Thanks!
10 9 * * * /home/oracle/testmysql.script | mailx -s "Test"
"email@domain"
| |
| Bill Marcum 2006-02-06, 5:56 pm |
| On 6 Feb 2006 06:18:48 -0800, vas117@psu.edu
<vas117@psu.edu> wrote:
> I have a cron job running as root. The Output from "cron" command
> email is being sent to root (which is our system admin and not me). I
> would like to receive these emails as well. I've tried to pipe the
> output to mail so that I can get this output (as in the below cron
> entry), but all I get is a blank email sent to that address that has
> "Test" as the subject. I don't see any of the output that is sent to
> the root user in the "Output from "cron" command" email. Can someone
> please help me figure this one out? Thanks!
>
> 10 9 * * * /home/oracle/testmysql.script | mailx -s "Test"
> "email@domain"
>
Maybe the output from your script is on standard error. Try
10 9 * * * /home/oracle/testmysql.script 2>&1 | mailx -s "Test" "email@domain"
--
It usually takes more than three weeks to prepare a good impromptu speech.
-- Mark Twain
| |
| Conrad J. Sabatier 2006-02-06, 8:48 pm |
| In article <mqckb3-jj4.ln1@don.localnet>,
Bill Marcum <bmarcum@iglou.com> wrote:
>
>
>On 6 Feb 2006 06:18:48 -0800, vas117@psu.edu
> <vas117@psu.edu> wrote:
>Maybe the output from your script is on standard error. Try
>
>10 9 * * * /home/oracle/testmysql.script 2>&1 | mailx -s "Test" "email@domain"
You might also try setting MAILTO=your-address somewhere before that line.
--
Conrad J. Sabatier <conrads@cox.net> -- "In Unix veritas"
|
|
|
|
|