Cron script crashing server...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



You could also check what environment variables the perl and shell scripts
depend upon.  Perhaps they are missing in the cron environment (Cron jobs
don't get the whole shell environment, which might explain why it does work
from the shell)


On Mon, Oct 03, 2005 at 07:39:48AM -0400, Mark Belanger wrote:
> Ian mu wrote:
> > Basically I have a perl script that runs once, first thing every
> > morning, gathering some stats (currently turned off due to problem).
> > Crontab -l shows the following...
> >
> > 00 6  * * * nice /home/statsman/stats/run_stats.sh  >/dev/null 2>&1 (.sh
> > file basically sources with full path a config with some vars, then runs
> > the perl script).
> 
> The first thing I would do to put some echos in run_stats.sh
> and change > /dev/null to > /path/somefile
> 
> If you're getting as far as the perl script, put some print
> statements in it.
> 
> You might try doing an strace from cron:
> 
> 00 6  * * * strace -f -oOutputFile /home/statsman/stats/run_stats.sh  
> >/path/somefile 2>&1
> 
> -Mark
> 
> _______________________________________________
> CentOS mailing list
> CentOS@xxxxxxxxxx
> http://lists.centos.org/mailman/listinfo/centos


Bestu kve?jur,

Ingimar

-- 
Ingimar R?bertsson, kerfisstj?ri, RHCE          EMAIL: iar@xxxxxxxx
Sk?rr hf                                        TEL:   +354-5695100
?rm?li 2, 108 Reykjav?k                         FAX:   +354-5695251
            http://www.skyrr.is/legal/disclaimer.txt

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux