Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 16th February 2011, 11: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 updateall.sh:

Code:
#!/bin/bash
cd /usr/share/awstats/
for file in *.conf
do
  F=${file:8}
  CONFIG=${F/.conf/}
  CMD=`/usr/share/awstats/bin/awstats.pl -update -config=$CONFIG | grep qualified`
  echo $CONFIG : $CMD
done
I have set up a cron job to execute the script once an hour as root like so:
Code:
0 * * * * /usr/share/awstats/bin/updateall.sh
Problem:
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:
Code:
crond[29721]: (root) CMD (/usr/share/awstats/bin/updateall.sh
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 updateall.sh 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 11:20.
Reply With Quote
Sponsored Links
 

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
postfix script execution in /etc/aliases fails knobenheimer Installation/Configuration 4 12th December 2013 08:24
use jawstats / mawstats with ispconfig e100 Tips/Tricks/Mods 3 19th December 2010 11:33
freebsd 7, samba 3, domain controller alexdimarco Suggest HOWTO 6 5th November 2010 16:54
Companion Script #2 for The Perfect Server - Fedora 13 x86_64 [ISPConfig 3]" MrCompTech Tips/Tricks/Mods 0 10th July 2010 05:11
Cron job fails kushan Server Operation 2 9th April 2010 02:52


All times are GMT +2. The time now is 11:42.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.