- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- receive scrpit result by mail
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
09-22-2008 04:08 AM
09-22-2008 04:08 AM
1 - I want to receive the notification (result) by mail.
2 – i want again to program it for every morning
Help me please
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2008 04:11 AM
09-22-2008 04:11 AM
Re: receive scrpit result by mail
2. Use cronjob to run the script. See man crontab.
regards,
ivan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2008 04:13 AM
09-22-2008 04:13 AM
Re: receive scrpit result by mail
help me please
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2008 04:16 AM
09-22-2008 04:16 AM
Re: receive scrpit result by mail
#1: capture the return status of whatever you are running:
...
RSLT=$?
mailx -s "Result of process X=${RSLT}" root < /dev/null
...
#2: Setup your script (which includes the above) as a crontask. See the manpages for 'crontab'.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2008 04:18 AM
09-22-2008 04:18 AM
Re: receive scrpit result by mail
> what is the command for the first option (redirect)? help me please
If you need to ask that, you need to begin with some basic shell programming. This might be helpful:
http://docs.hp.com/en/B2355-90046/index.html
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2008 04:26 AM
09-22-2008 04:26 AM
Solutionhttp://www.hpux.ws/mailfile2
This script which you MUST modify before using will send any report you want as an attachment.
It can be modified to do many things.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2008 04:37 AM
09-22-2008 04:37 AM
Re: receive scrpit result by mail
command to send mail(should be part of script)
cat /tmp/scripts/report |mailx -s "Daily_Report_`hostname`" abcdsrrr@company.com >/dev/null 2>&1
schedule script in cron to send mail at 8 0 clock
0 8 * * * /root/scripts/dailycheck/DailyReport.sh >/dev/null 2>&1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2008 05:22 AM
09-22-2008 05:22 AM
Re: receive scrpit result by mail
0 8 * * * /root/scripts/dailycheck/DailyReport.sh 2>&1 | mailx -s "Daily report" me@mydomain.com
Will run the script at 8:00 every morning and e-mail you the results. This way you don't necessarily need to worry with making sure all command output is sent to a log file, and then e-mail the logfile to yourself.