- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- HPUX at command
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
Discussions
Discussions
Forums
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
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
тАО07-23-2008 03:25 AM
тАО07-23-2008 03:25 AM
I am having some problems uaing the at command, the command I am using is the following:
banner hello 123 | mailx shailesh.solanki@email.com | at 1245
as soon as I hit enter the command runs, regardless of the time but the command
at -l
1216812600.a Wed Jul 23 12:45:00 2008
will show that the job still exists and is scheduled to run at 12:45, but then does not run at 12:45.
Does anyone have any ideas on what is happenning? and how I can stop the job running instantly.
Thanks
Shailesh Solanki
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-23-2008 03:56 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-23-2008 05:41 AM
тАО07-23-2008 05:41 AM
Re: HPUX at command
In fact, you should put your commands in a file to keep it simple.
What you have done is sent a banner to mailx and this gets mailed.
The output of mailx is then sent to at(1) to be done at 1245.
>will show that the job still exists and is scheduled to run at 12:45, but then does not run at 12:45.
Sure it does. Look inside the file /var/spool/cron/atjobs/ 1216812600.a to see what it is really doing.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-23-2008 05:41 AM
тАО07-23-2008 05:41 AM
Re: HPUX at command
banner hello 123 is executed and the output is sent to mailx.
Mailx executes and the output of that command is then sent to the at command.
Which is why the email is sent immediately.
Try this:
echo "banner hello 123 | mailx shailesh.solanki@email.com" | at 1245
Then hopefully at 1245 the following command will be run :
banner hello 123 | mailx shailesh.solanki@email.com
You may want to put the full path to banner and mailx in the statement.
Don't have a system to test this right now...but I think it may work :)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-23-2008 05:41 AM
тАО07-23-2008 05:41 AM
Re: HPUX at command
think about what this says:
execute banner command, send the results to the pipe
execute mailx command using piped input and send the *output* of mailx to pipe (which isn't the email)
so the mail gets sent, and at 1245 "at" may try to run the "command" specified by the output of mailx...check the at-job itself to see for sure.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-23-2008 05:56 AM
тАО07-23-2008 05:56 AM
Re: HPUX at command
Thanks to Everyone who has replied, the best solution for me was the following
at -f /home/shailesh/123 1500
I had had to script what I needed to do but this worked best.
and all the other replies help me to understand what was happening.
Thanks
Shailesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-23-2008 06:07 AM
тАО07-23-2008 06:07 AM
Re: HPUX at command
echo "/usr/bin/banner test | mailx -s 'test' my.account@aniceplacetowork.com" | at now
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-23-2008 06:43 AM
тАО07-23-2008 06:43 AM
Re: HPUX at command
If our answers were helpful, please read the following about assigning points:
http://forums.itrc.hp.com/service/forums/helptips.do?#33
And about reopening threads:
http://forums.itrc.hp.com/service/forums/helptips.do?#41