- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- User's at jobs failing
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
Forums
Discussions
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
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
08-10-2003 03:28 PM
08-10-2003 03:28 PM
User's at jobs failing
I have a user complaining that his at jobs are failing.
He says he sets his jobs to run at 05:00 and when the at command goes through it says that it will run at 05:01.
The job fails - but of course he has "messed" up whatever logs there might have been because he was trying to copy them ... blah, blah, blah. so I can't see what the error message was.
Why does the at job decide to ru na second after the time he chose? Is there another job running under his name at that time that I can't see?
There are no other at jobs listed and no crons under the user's name.
-Ronell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2003 03:44 PM
08-10-2003 03:44 PM
Re: User's at jobs failing
I will suggest this:
Set aside some time and sit down with the user and watch as he/she sets up the jobs.
As far as I know, if the cron daemon is running and the at job is set up right it will run on time.
My best guess is the user has no idea how to set up the jobs. Find him/her a cheat sheet and go through it a few times. These issues are almost user education with our operations staff. They rarely use at and have to be shown how to do it each time.
As far as the jobs themselves, structure them so all of their output goes to a file. Then at least you'll see an error code.
Another thing about at/cron jobs. The user is responsible to set up all of the environment. There is no path, no environment or TERM variable. That has to be set up in a script. A script that works great at the command line can fail for many reasons in cron/at state.
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
08-10-2003 03:52 PM
08-10-2003 03:52 PM
Re: User's at jobs failing
Is the user listed in /var/adm/cron/at.deny?
If only at.deny exists but is empty (s)he should be OK.
If neither file exists, only root can run at jobs, so create the at.allow and add the user.
I don't recall if there is a log file for at, but you can redirect the stderr by adding:
2>/
...to the end of the command.
Hope this helps.
Rob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2003 03:58 PM
08-10-2003 03:58 PM
Re: User's at jobs failing
Have a look at the values in /usr/lib/cron/queuedefs
They should be at least this:
a.4j1n
b.2j2n90w
c.100j1n
a=at jobs
b=batch jobs
c=cron jobs
Could be that cron is overloaded as well. If you make changes to the above file, cron needs to be restarted.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2003 04:00 PM
08-10-2003 04:00 PM
Re: User's at jobs failing
thanks, I'm guessing user error as well. I have seen the comman he is trying to run and he does set up the environment he needs.
I'll get him to redirect the output to a log file (and then leave the damn thing alone) so I can see what is going on.
Rob, the user can run at jobs.
Thanks guys
Ronelle
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2003 07:20 PM
08-10-2003 07:20 PM
Re: User's at jobs failing
OK, I've done some more tests and I don't really understand the results:
As root, I set up 2 at jobs to run at 15:10 - they both came up as running at 15:10:00
As the user I set up 2 at jobs to run at 15:12 - one came up as running at 15:12:00 and the other at 15:12:01
As myself I set up 2 at jobs to run at 15:15 - one came up as running at 15:15:00 and the other at 15:15:01
This would indicate to me that if an at job is running at a specific time then another at job, scheduled for the same time, will run a second later. Unless you're root.
So this indicates that the user has a job running at 0500 because when he schedules one at 0500 it runs at 05:00:01. Right?
Only I can't find a job running under the user at that time
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2003 01:39 AM
08-11-2003 01:39 AM
Re: User's at jobs failing
The man page for at(1) has the following warning:
"If the execution-time request for a job duplicates the execution time
of a currently scheduled job, the new job time is set to the next
available second."
Is your user specifying the time down to the second, or just to the minute? It could be worth testing.
I'm intrigued why it is so critical that the job runs at the exact time rather than 1 second later, also are your user's timings coming from inside their at job, or the /var/adm/cron/log?
regards,
Darren
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2003 01:05 PM
08-11-2003 01:05 PM
Re: User's at jobs failing
1) Yes, we've pretty much figured out that the at thinks there is another job scheduled at the same time.
2) The user is specifying only to the minute - we could test it to the second.
3) It is not critical that the job runs at that exact time but it is important to find out why the at jobs think there is another scheduled job running at 05:00:00 when we can't find it.
4) I'm not sure what your last question is asking but after running the at command it tells you when the job is scheduled for and that tell us teh 05:00:01 time
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2003 01:40 PM
08-11-2003 01:40 PM
Re: User's at jobs failing
I just took another look at the cron log file and, I missed it yesterday, another user is scheduling a job at the same time.
Sorry about that.
-Ronelle
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2003 01:40 PM
08-11-2003 01:40 PM
Re: User's at jobs failing
I just took another look at the cron log file and, I missed it yesterday, another user is scheduling a job at the same time.
Sorry about that.
we've also discovered that it is the user's ftp permissions that are causing his job to fail.
-Ronelle