HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- MAILTO equivalent in crontab?
Operating System - HP-UX
1830362
Members
2513
Online
110001
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
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
04-01-2004 09:05 AM
04-01-2004 09:05 AM
MAILTO equivalent in crontab?
I've learned to love the "MAILTO" environement variable as it emails STDOUT and STDERR (assuming they're not redirectred) to the recipient specified. Example cron file:
MAILTO=user@host.com
0 0 * * * /some/command
STDOUT and STDERR from /some/command would be emailed to user@host.com in this example.
I get an error from cron on HPUX 11 about syntax, probably because of the @ sign. Is there an equivalent way to email STDOUT and STDERR from cron jobs to an email address?
Thanks...
MAILTO=user@host.com
0 0 * * * /some/command
STDOUT and STDERR from /some/command would be emailed to user@host.com in this example.
I get an error from cron on HPUX 11 about syntax, probably because of the @ sign. Is there an equivalent way to email STDOUT and STDERR from cron jobs to an email address?
Thanks...
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2004 09:08 AM
04-01-2004 09:08 AM
Re: MAILTO equivalent in crontab?
Hi,
have you tried with
0 0 * * * /some/command 2>&1 | mail user@host.com
?
greetings,
Michael
have you tried with
0 0 * * * /some/command 2>&1 | mail user@host.com
?
greetings,
Michael
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2004 09:11 AM
04-01-2004 09:11 AM
Re: MAILTO equivalent in crontab?
Hi,
Good suggestion, and that's probably the cleanest way short of MAILTO. I was hoping something similar to MAILTO existed to save myself the trouble of appending that string.
Thanks for the suggestion and your help.
Clay
Good suggestion, and that's probably the cleanest way short of MAILTO. I was hoping something similar to MAILTO existed to save myself the trouble of appending that string.
Thanks for the suggestion and your help.
Clay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2004 09:21 AM
04-01-2004 09:21 AM
Re: MAILTO equivalent in crontab?
Hi,
your suspiccions seem to be right. Look here:
http://www.rt.com/man/crontab.5.html
It seems, crontab supports only local mails.
I just have this thought, you could create a .mailrc and you may use MAILTO and distribute it to a mail list.
what do you think?
Michael
your suspiccions seem to be right. Look here:
http://www.rt.com/man/crontab.5.html
It seems, crontab supports only local mails.
I just have this thought, you could create a .mailrc and you may use MAILTO and distribute it to a mail list.
what do you think?
Michael
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