![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how to forward mail in /var/mail/username to external mail | unitipon | SUN Solaris | 2 | 05-27-2008 01:20 AM |
| at vs cronjob | mokkan | SUN Solaris | 1 | 05-17-2008 12:50 AM |
| Cronjob - Redirect mail output to file, LINES & COLUMNS | jharvey | Shell Programming and Scripting | 0 | 04-14-2008 04:19 PM |
| cannot run cronjob | shahrahulb | UNIX for Advanced & Expert Users | 3 | 10-28-2004 10:45 AM |
| Cronjob | gerwhelan | Shell Programming and Scripting | 4 | 12-14-2001 06:17 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Hi,
I'm having a HP UX 11i and 11.0 . I've given the cron access to one of the user. Now he is getting mails on errors only and not on success on execution of the command. How can i make sure that the mail is sent in both the cases of success and failure. Also the mail is going to the lotus notes mailbox. Where can i change it, and sent the mail to his unix mail box only? Thanks Dhanish |
|
||||
|
I'm not mentioning about any specific command. I get the mail only on faliure, regardless on the command i use. Now i want to know where can i change this, like say if i want to change the failure mails to be sent to user@hostname.com rather than to user@company.com ? I was not able to find it in the man pages as well. Hope it clear this time
|
|
|||||
|
Do your cron entries have 2>&1 in them? If so, this is telling it to send email only on failure. Cron usually sends email on success or failure. Most people don't want the successful ones, only wanting to know when it failed. Or they just send output to a log file to look at it later (or mail the log file after the job is completed).
To change where the email goes, either set it up that the output goes to a log file and email the results after the job is done to the different user, OR you can change the alias for user@hostname to send mail to user@company.com. Or someone can give another option - |
|
||||
|
The following sends email to a loguser with the output from the "command".
crontab entry for the user: * * * * * /path/command 2>&1 | mail -s "command report rc=4?" logmaster /etc/aliases file directing email to root at the local host: logmaster: root@localhost compile the aliases file with sendmail -bi |
![]() |
| Bookmarks |
| Tags |
| sendmail |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|