- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Cron Problem
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
02-13-2006 07:09 PM
02-13-2006 07:09 PM
Cron Problem
I have a cron entry in the crontab file which used to run about dozen of days back.
Now suddenly it has stoped to run.
Two things that i investigated:
The cron log shows that it has run successfuly.
There is no problem with the entry, as simply copying-pasting it in shell runs it.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2006 07:13 PM
02-13-2006 07:13 PM
Re: Cron Problem
--
Muthu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2006 07:24 PM
02-13-2006 07:24 PM
Re: Cron Problem
What was the expected result? How did you conclude that it wasn't working ?
-Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2006 07:46 PM
02-13-2006 07:46 PM
Re: Cron Problem
Any ENV variables changed ??
-Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2006 07:48 PM
02-13-2006 07:48 PM
Re: Cron Problem
Seems to me that cron may have failed to run.
ps -ef | grep cron
If you don't hae a cron daemon running,
/sbin/init.d/cron start
Its also possible that there was a bad entry added to the crontab table.
crontab -l
look for something new and remove it.
If you have recently upgraded your system to trusted, this is a possible impact.
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
02-13-2006 07:51 PM
02-13-2006 07:51 PM
Re: Cron Problem
The entry is :
01 01 * * 2 script parameter
In the log its:
CMD: script parameter
User_name 10246 c Tue Feb 14 01:01:00 2006
Anything else
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2006 07:52 PM
02-13-2006 07:52 PM
Re: Cron Problem
root 207 1 0 Nov 17 ? 9:10 /usr/sbin/cron
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2006 07:53 PM
02-13-2006 07:53 PM
Re: Cron Problem
01 01 * * 2 script parameter
In the log its:
CMD: script parameter
User_name 10246 c Tue Feb 14 01:01:00 2006
It has to execute on every tuesday in the week at 01 minute of 01 hour.
It is done. It will execute script by next tuesday as,
Feb 21 01:01:00 2006 time.
what is the problem you are seeing with this.
--
Muthu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2006 07:55 PM
02-13-2006 07:55 PM
Re: Cron Problem
01 01 * * 2 script parameter
to suite your requirement of execution time (If you need). Please tell if you want to change time of execution of this script.
--
Muthu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2006 07:57 PM
02-13-2006 07:57 PM
Re: Cron Problem
The script copies something, which isn't happening.
The script is error free as simply running:
script parameter
works fine and this used to run via cron also some days back.
That's what i am not able to find out.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2006 07:58 PM
02-13-2006 07:58 PM
Re: Cron Problem
It has executed properly. what was the result of the script ? How did you its not working ?
-Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2006 08:00 PM
02-13-2006 08:00 PM
Re: Cron Problem
xx xx * * 2 script parameter 1>/tmp/test.log 2>&1
change xx xx time and hour to now. Like,
0 15 in india. Change to near coming time and update the change.
what you are getting in /tmp/test.log file?
--
Muthu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2006 08:00 PM
02-13-2006 08:00 PM
Re: Cron Problem
Because this cron is running in US and i need to access the thing in India.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2006 08:03 PM
02-13-2006 08:03 PM
Re: Cron Problem
-Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2006 08:12 PM
02-13-2006 08:12 PM
Re: Cron Problem
script parameter 1>/tmp/test.log 2>&1
and,
what is the full syntax you are using in command like with script name and parameter.
--
Muthu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2006 08:32 PM
02-13-2006 08:32 PM
Re: Cron Problem
x x x x x /absolute_path parameter
I will have to do some work to add a new entry in that machine.
Will update you when its done.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2006 10:18 PM
02-13-2006 10:18 PM
Re: Cron Problem
The cron log should show both the start and completion enties for your job, like this:
> CMD: /apps/bin/wb/checkweb.ksh
> informix 7818 c Fri Feb 10 13:08:00 EST 2006
< informix 7818 c Fri Feb 10 13:08:00 EST 2006
Does you log contain an entry indicating the completion?
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2006 10:18 PM
02-13-2006 10:18 PM
Re: Cron Problem
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2006 10:56 PM
02-13-2006 10:56 PM
Re: Cron Problem
It contains only one entry.
That means it hasn't run.
Now the question comes, WHY?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2006 11:14 PM
02-13-2006 11:14 PM
Re: Cron Problem
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2006 01:44 AM
02-14-2006 01:44 AM
Re: Cron Problem
If someone has edited crontab with "vi" instead of crontab -e, cron will get confused. Stop cron, edit crontab the correct way (crontab -e), save your changes even if you haven't made any... restart cron.
Tonya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2006 08:04 AM
02-14-2006 08:04 AM
Re: Cron Problem
Hope it helps. Any explanation or way around would be greate.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2006 10:00 AM
02-14-2006 10:00 AM
Re: Cron Problem
#!/usr/bin/sh
Then edit your script to trace all the steps by adding set -x as in:
#!/usr/bin/sh
set -x
Now you won't have to guess what happened. The result of this script's trace will go to the email for the user running this script.
It is very common for a script to fail in cron but run OK in a login shell. The trace will tell you why (cron has a very limited environment). Most likely there are missing variables in your script's environment.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2006 05:49 PM
02-14-2006 05:49 PM
Re: Cron Problem
Not a problem with the cron file also as many other entries run in the same cron file.
Now what do i do
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2006 06:47 PM
02-14-2006 06:47 PM
Re: Cron Problem
It only happened when I switched from trusted mode to non-trusted mode, and switches it back few times.
But i believe it is something to do with secure mode.
Check the root mail.
"Cron: Your job did not contain a valid audit ID"
This may be the problem.
From past article, this may help:
1. Run tsconvert -p
This will build a file /usr/spool/cron/.cronaids with the data
the system needs
2. Then restart cron.
/sbin/init.d/cron stop
/sbin/init.d/cron start