- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Deactivate mail notification from root cron to roo...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-13-2003 07:44 AM
03-13-2003 07:44 AM
We have a forward from root mail to our outlook mail.
We have a cron process/procedure that generates messages each 15 minutes. This messages are sent to root mail, and consequently, to our outlook mail.
We??d like eliminate these cron messages.
Do you know the way to do?
Thanks in advance.
Regards.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-13-2003 07:48 AM
03-13-2003 07:48 AM
Re: Deactivate mail notification from root cron to root mail.
If you don't redirect your cron task's output (stdout and/or stderr), then, by default, the output is mailed to "root".
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-13-2003 07:49 AM
03-13-2003 07:49 AM
Re: Deactivate mail notification from root cron to root mail.
crontab -e will open the root cronjob and edit it accordingly.
Or if you don't want to come to your outlook mail then in root's home directory ther should be a .forward file to forward all root mails to your outlook account , remove this file
-USA..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-13-2003 07:51 AM
03-13-2003 07:51 AM
Re: Deactivate mail notification from root cron to root mail.
As what user does cron run ?
if it is a simple user you can choose to ignore all messages that comefrom that user by adding a line in the /etc/mail/aliases :
userA: /dev/null
If it runs under root you might want to look at the script that gets started by cron. There must be a way to capture the error message within the script.
I don't believe Cron has this feature. I have been looking for it a while back as well, due to a non-existing homedir (user that had a homedir within a package of the cluster).
Best Regs David
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-13-2003 07:55 AM
03-13-2003 07:55 AM
Solutionand stderr to root unless you specifically state in the
command that stdout and stderr are redirected elsewhere.
To disable cron from mailing output to root add the following to the end of the
cron entry:
> /dev/null 2>&1 (this redirects both std. out and std. error)
0 1 * * * /path/command [options] > /dev/null 2>&1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-13-2003 07:55 AM
03-13-2003 07:55 AM
Re: Deactivate mail notification from root cron to root mail.
Either redirect standard output/error to a logfile (if you are interested in it) or to /dev/null if you are not. For example the crontab entry:
* * * * * script
to trash all output becomes:
* * * * * script >/dev/null 2>&1
to append to a logfile:
* * * * * script >>logfile 2>&1
Regards,
John