- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Cron jobs not executed for specific user
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
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
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
тАО10-12-2009 11:51 PM
тАО10-12-2009 11:51 PM
We have noticed that none of them is executed any more as scheduled, whereas as manual commands are successful.
Even simple commands under this user's crontab (eg date) are not executed whereas under another crontab with same group and same shell are successful.
Restarting cron daemon does not have any result and
ps -ef|grep cron
shows
# ps -ef|grep cron
root 13824 13798 0 17:10:25 pts/1 0:00 grep cron
root 16891 1 0 11:35:35 ? 0:01 /usr/sbin/cron
Can you please advice on what the problem can be?
Solved! Go to Solution.
- Tags:
- cron
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-13-2009 12:08 AM
тАО10-13-2009 12:08 AM
Re: Cron jobs not executed for specific user
Second you will have to tell how u scheduled the jobs...
crontab -e or crontab filename
BR,
Kapil+
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-13-2009 12:13 AM
тАО10-13-2009 12:13 AM
Re: Cron jobs not executed for specific user
you could use su - $user and all your defined crontab scripts could be running under root crontab.
mikap
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-13-2009 12:35 AM
тАО10-13-2009 12:35 AM
Re: Cron jobs not executed for specific user
In the past everything was working properly.
Is it possible that any cron job of this user is hanged and causes the rest of them not to be executed?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-13-2009 12:40 AM
тАО10-13-2009 12:40 AM
Re: Cron jobs not executed for specific user
when you executing the script manually,
under which user and how ??
sh shell_script.sh
mikap
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-13-2009 12:41 AM
тАО10-13-2009 12:41 AM
Re: Cron jobs not executed for specific user
If cron.allow is exist then put the user entry & restart the cron daemon.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-13-2009 01:25 AM
тАО10-13-2009 01:25 AM
Re: Cron jobs not executed for specific user
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-13-2009 01:52 AM
тАО10-13-2009 01:52 AM
Re: Cron jobs not executed for specific user
Is it possible that any cron job of this user is hanged and causes the rest of them not to be executed?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-13-2009 02:47 AM
тАО10-13-2009 02:47 AM
Re: Cron jobs not executed for specific user
You say cron.allow is OK then
What can you see when examine the logs related with your user:
more /var/adm/syslog/syslog.log
more /var/adm/cron.log
OR
cat /var/adm/cron.log | grep -i
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-13-2009 02:49 AM
тАО10-13-2009 02:49 AM
Re: Cron jobs not executed for specific user
try this with user root if you can afford it ?
and write here what is your exactl line in cronjob ?
crontab -e ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-13-2009 03:26 AM
тАО10-13-2009 03:26 AM
Re: Cron jobs not executed for specific user
The problematic user is nmcman.
Does this give you any clue?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-13-2009 04:08 AM
тАО10-13-2009 04:08 AM
Solution> nmcman 19468 c Mon Oct 12 12:00:00 EETDST 2009
...
< nmcman 19468 c Mon Oct 12 12:00:00 EETDST 2009 ts=9
The log entries are intermixed with log entries from other jobs so you have to pair the log entries approprietly. The ">" stands for a job start and the "<" stands for a job exit. You can see the ts=9 at the exit entry. That is a hard kill with a "kill -9" signal. Now a few things to check as to why the jobs are getting killed.
1. Yes in some cases a command will not run if a another commnad is still executing from before. This is true with commands that lock a file or depend another resource (such as a port or a pipe file or a fifo) which is in use by a previously executed command
Check with "ps -efu nmcman" to see what else is running by this user.
2. Check if you are hitting any system limits such as open files, flocks, user processes etc. Look at the /var/adm/syslog/syslog.log for any errors.
3. Did you recently convert to a trusted system?
You also have too many jobs running every minute. Is that really necessary?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-13-2009 04:28 AM
тАО10-13-2009 04:28 AM
Re: Cron jobs not executed for specific user
Try (if you can use root) the same command with user root OR another user in cronjob:
as far as I can see also nmcman used another commands with this use and also got killed
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-13-2009 04:47 AM
тАО10-13-2009 04:47 AM
Re: Cron jobs not executed for specific user
The commands fail only for the specific user. All the others are working fine.
I will re-check cron and syslog logs.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-13-2009 04:58 AM
тАО10-13-2009 04:58 AM
Re: Cron jobs not executed for specific user
You can add the -x c-shell flag to the crontab entry so that you get all the commands echoed as they are executed.
... csh -f -x /opt/mv36 ...
You can simplify his cronjob, why did he/she put /../ in there. It does not change anything, it just finds the command more directly.
... csh -f -x /opt/mv36/core/script/CK ...
Check
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-13-2009 05:49 AM
тАО10-13-2009 05:49 AM
Re: Cron jobs not executed for specific user
I would suggest you not write cron scripts using the scummy C shell.
Unfortunately you have one entry: date >> /home/nmcman/test2.txt
that uses the posix shell and that aborts too.
One time when cron was aborting, it occurred due to a bogus value of TZ. What's the value for nmcman?
>TTr: The jobs are getting executed but are getting a killed with a ts=9 status.
Hmm, the last time I looked, kill 9 would be ts=137, 128+9.
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1287859
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1212499
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1287859
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1319191
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-13-2009 06:17 AM
тАО10-13-2009 06:17 AM
Re: Cron jobs not executed for specific user
Isn't the 128 offset used for the root user only?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-13-2009 06:31 AM
тАО10-13-2009 06:31 AM
Re: Cron jobs not executed for specific user
I'm not sure why wait(2) would treat root special?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-13-2009 11:04 PM
тАО10-13-2009 11:04 PM
Re: Cron jobs not executed for specific user
The 128 is used to indicate a coredump was produced. So you are correct, there was a kill -9.
SIGKILL is also also occurs when dld detects unsats. (Not sure how that happens with date(1).)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-13-2009 11:43 PM
тАО10-13-2009 11:43 PM
Re: Cron jobs not executed for specific user
The OS is HP-UX version B.11.23 in a ia64 hp server rx6600.
What else can i check so as to find the root cause of the failure (ts=9)?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-14-2009 12:02 AM
тАО10-14-2009 12:02 AM
Re: Cron jobs not executed for specific user
Do the following to make sure manual commands fail:
$ env -i PATH=/usr/bin:/usr/sbin:. sh
Now try your "manual" commands and see if they fail with signal 9.
>What else can I check so as to find the root cause of the failure (ts=9)?
Have you stopped and restarted cron?
Have you rebooted after this user started failing?
I suppose you could use tusc on cron to see what it is doing:
tusc -fp -ea -o tusc.out $(UNIX95=EXTENDED_PS ps -C cron -o pid=)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-14-2009 12:03 AM
тАО10-14-2009 12:03 AM
Re: Cron jobs not executed for specific user
Can you post the crontab -l and the script which is not executed.
Suraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-14-2009 02:23 AM
тАО10-14-2009 02:23 AM
Re: Cron jobs not executed for specific user
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-14-2009 04:34 AM
тАО10-14-2009 04:34 AM
Re: Cron jobs not executed for specific user
$ env -i PATH=/usr/bin:/usr/sbin:. sh
Now try your "manual" commands and see if they fail with signal 9.
Can you please explain what this command does?
>Have you stopped and restarted cron?
Have you rebooted after this user started failing?
cron was restarted and server was rebooted without result
>I suppose you could use tusc on cron to see what it is doing:
tusc -fp -ea -o tusc.out $(UNIX95=EXTENDED_PS ps -C cron -o pid=)
Can you please explain what this command does and if we have to type everything (even these that are in parenthesis)?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-14-2009 04:45 AM
тАО10-14-2009 04:45 AM
Re: Cron jobs not executed for specific user
> Can you please explain what this command does?
Can the nmcman user login to the server without any problems? After login can he/she execute the same commands from the cron job, by typing them on the unix command line?
You have not been giving answers to most of the questions that people have asked you here.