HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- cron still sends e-mail
Operating System - HP-UX
1830509
Members
2492
Online
110006
Solutions
Forums
Categories
Company
Local Language
back
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
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- 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
08-23-2001 10:18 AM
08-23-2001 10:18 AM
I have a number of cron jobs run by user 'oracle' that are used to do the daily maintenance. One in particular is sending output to the 'oracle' e-mail queue even though I have it re-directed to a log file as follows:
5,20,35,50 * * * * /dba/dba/maestro/compress_arch.sh >> /dba/dba/log/dwprod01/compress_arch.log
Can anyone tell my why this is still sending output to the e-mail and how can I stop it? Since this job runs every 15 minutes it builds up quite a queue of messages which I must delete manually.
5,20,35,50 * * * * /dba/dba/maestro/compress_arch.sh >> /dba/dba/log/dwprod01/compress_arch.log
Can anyone tell my why this is still sending output to the e-mail and how can I stop it? Since this job runs every 15 minutes it builds up quite a queue of messages which I must delete manually.
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2001 10:22 AM
08-23-2001 10:22 AM
Solution
Hi Don,
Are the emails only for the failed job?
Try adding a "2>&1" at the end of the cron job.
what this will do is send both the STDOUT and STDERR to the log file
-HTH
Ramesh
Are the emails only for the failed job?
Try adding a "2>&1" at the end of the cron job.
what this will do is send both the STDOUT and STDERR to the log file
-HTH
Ramesh
They think they know but don't. At least I know I don't know - Socrates
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2001 10:26 AM
08-23-2001 10:26 AM
Re: cron still sends e-mail
Hi Don,
Check script compress_arch.sh it might have mailx command running inside the script.
Or If script prints anything on standard output then cron will sends email automatically. so use 2>&1 at end of your cron line.
5,20,35,50 * * * * /dba/dba/maestro/compress_arch.sh >> /dba/dba/log/dwprod01/compress_arch.log 2>&1
Sachin
Check script compress_arch.sh it might have mailx command running inside the script.
Or If script prints anything on standard output then cron will sends email automatically. so use 2>&1 at end of your cron line.
5,20,35,50 * * * * /dba/dba/maestro/compress_arch.sh >> /dba/dba/log/dwprod01/compress_arch.log 2>&1
Sachin
Is photography a hobby or another way to spend $
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2001 10:31 AM
08-23-2001 10:31 AM
Re: cron still sends e-mail
Thanks, Ramesh. I knew it had to be something simple. As I looked through my crontab file I noticed that I had added the output redirect to other jobs to solve this problem.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP