Re: Change cron output to other user
- From: "moonhk" <moon_ils-se@xxxxxxxxxxxx>
- Date: 9 Aug 2006 18:00:41 -0700
Nathan Dietsch wrote:
Hi Moonhk,
moonhk wrote:
tunla wrote:
moonhk wrote:
OS : SunOS Generic_105181-39 sun4u sparc SUNW,Ultra-4
I received below mail many years. How to change to other user name ?
If you want to redirect mail from your account to another account, use a
.forward file. Note: That will redirect all mail.
If you want to send the output from this cronjob to another user and
stop getting the mails yourself, pipe it to mailx and send it to the
other user. In this case;
N N N N N /export/home/users/eric/callbat.ksh -s 2>&1 | mailx -s "Cron
output" user@xxxxxxxxxx
That will send STDOUT and STDERR to the other user.
I hope this helps.
Kind Regards,
Nathan Dietsch
Your "cron" job on machine_A
/export/home/users/eric/callbat.ksh -s
produced the following output:
This is Process_MPS
Cron sends mail to the user who ows the crontab file
that produces the output. ( unless you have been tinkering with
/etc/mail/aliases )
If you dont want/need the output from the job you can:
redirect the output to /dev/null
edit crontab entry to look like this.
23 4 * * * /some/command/name > /dev/null 2>&1
//Lars
Thank. I still need the cron output. I want change to other person.
I check the /etc/mail/aliases, have below content.
# Following alias is required by the mail protocol, RFC 822
# Set it to the address of a HUMAN who deals with this system's mail
problems.
Postmaster:root
We using other SMTP server to send mail. Is it some setting in SMTP
server, redirect to my name ?
Thank, But this is not my want. In UNIX or smtp server, should be have
setting send the cron output to me.
In our case, if cron have any output or scrip have error, I will
receive as below
eg.
In crontab input
00 1 * * * /export/home/users/batch/xcp_batlog.ksh
In my mail account will have below mail
Your "cron" job on xxxxx
/export/home/users/batch/xcp_batlog.ksh
produced the following output:
cp: cannot access /export/eoj.prn
.
- Follow-Ups:
- Re: Change cron output to other user
- From: tunla
- Re: Change cron output to other user
- References:
- Change cron output to other user
- From: moonhk
- Re: Change cron output to other user
- From: tunla
- Re: Change cron output to other user
- From: moonhk
- Re: Change cron output to other user
- From: Nathan Dietsch
- Change cron output to other user
- Prev by Date: Re: Nervous about find + remove as root...any options?
- Next by Date: diskless Solaris 10 setup?
- Previous by thread: Re: Change cron output to other user
- Next by thread: Re: Change cron output to other user
- Index(es):
Relevant Pages
|
|