[CentOS] Cron script crashing server...
iar at skyrr.is
Mon Oct 3 11:47:12 UTC 2005
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
> CentOS mailing list
> CentOS at centos.org
Ingimar Róbertsson, kerfisstjóri, RHCE EMAIL: iar at skyrr.is
Skýrr hf TEL: +354-5695100
Ármúli 2, 108 Reykjavík FAX: +354-5695251
More information about the CentOS