View Single Post
Old 16th February 2011, 12:07
CuriousGuy CuriousGuy is offline
Junior Member
Join Date: Feb 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Cron script fails after 70 iterations

Description of system:
I have the following script to update around 500 AWStats databases automatically called

cd /usr/share/awstats/
for file in *.conf
  CMD=`/usr/share/awstats/bin/ -update -config=$CONFIG | grep qualified`
  echo $CONFIG : $CMD
I have set up a cron job to execute the script once an hour as root like so:
0 * * * * /usr/share/awstats/bin/
Running this script by hand as root works everytime without fail. When it is executed as a cronjob, it will only process the first 70 configuration files before exiting.

/var/log/cron only shows:
crond[29721]: (root) CMD (/usr/share/awstats/bin/
UPDATE: Something very odd! I tried setting "ulimit -t 1800" in the script to no avail, but when I tested the cronjob by setting it to run in the next minute, I discovered that there are two processes running, but only one crond process running. I had *JUST* set this script to run that next minute so there is no other user's cronjob that could be interfering. Very, very odd indeed!

Does cron have a timeout or some other configuration setting I should be looking at? Thank you for any assistance!

Last edited by CuriousGuy; 16th February 2011 at 12:20.
Reply With Quote
Sponsored Links