<div>Ok, weirder, thanks for the advice by the way, I guess its isolated it somewhat and not where I thought it would be....added the strace, but looks like not needed as never gets that far... </div>
<div> </div>
<div>Piped the cron commandline to a file crondebug as mark suggested, its created at cron run time, but empty.</div>
<div>36 13 * * * /home/statsman/stats/run_stats.sh >/home/statsman/stats/crondebug</div>
<div> </div>
<div>For the first line of the run_stats.sh (tried also with #!/bin/bash) file it calls I added </div>
<div> </div>
<div>echo "stage 1" >> /home/statsman/stats/gendebug </div>
<div> </div>
<div>Run it manually from console it echos stage 1, (also echo stage 2 I added, then after that the perl script is invoked) fine. </div>
<div> </div>
<div>Run from cron it never even does the echo "stage 1" to the file (or at least doesn't create it).</div>
<div> </div>
<div>So it looks like its either dying on execing the file and not getting any further as it never writes the first line of the simple bash script or not even trying to call the file? (file gendebug isn't even created).</div>

<div> </div>
<div>More puzzled at this moment than I thought (nothing in root mail from cron either btw, and rest of crontab seems ok, I leave the line in just comment out the line with a single # and it doesn't crash ). </div>
<div> </div>
<div>Baffled :), thanks again, Ian</div>
<div> </div>
<div><br><br> </div>
<div><span class="gmail_quote">On 10/3/05, <b class="gmail_sendername">Ingimar Robertsson</b> <<a href="mailto:iar@skyrr.is">iar@skyrr.is</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">You could also check what environment variables the perl and shell scripts<br>depend upon.  Perhaps they are missing in the cron environment (Cron jobs
<br>don't get the whole shell environment, which might explain why it does work<br>from the shell)<br><br><br>On Mon, Oct 03, 2005 at 07:39:48AM -0400, Mark Belanger wrote:<br>> Ian mu wrote:<br>> > Basically I have a perl script that runs once, first thing every
<br>> > morning, gathering some stats (currently turned off due to problem).<br>> > Crontab -l shows the following...<br>> ><br>> > 00 6  * * * nice /home/statsman/stats/run_stats.sh  >/dev/null 2>&1 (.sh
<br>> > file basically sources with full path a config with some vars, then runs<br>> > the perl script).<br>><br>> The first thing I would do to put some echos in run_stats.sh<br>> and change > /dev/null to > /path/somefile
<br>><br>> If you're getting as far as the perl script, put some print<br>> statements in it.<br>><br>> You might try doing an strace from cron:<br>><br>> 00 6  * * * strace -f -oOutputFile /home/statsman/stats/run_stats.sh
<br>> >/path/somefile 2>&1<br>><br>> -Mark<br>><br>> _______________________________________________<br>> CentOS mailing list<br>> <a href="mailto:CentOS@centos.org">CentOS@centos.org</a><br>
> <a href="http://lists.centos.org/mailman/listinfo/centos">http://lists.centos.org/mailman/listinfo/centos</a><br><br><br>Bestu kveðjur,<br><br>Ingimar<br><br>--<br>Ingimar Róbertsson, kerfisstjóri, RHCE          EMAIL: 
<a href="mailto:iar@skyrr.is">iar@skyrr.is</a><br>Skýrr hf                                        TEL:   +354-5695100<br>Ármúli 2, 108 Reykjavík                         FAX:   +354-5695251<br>           <a href="http://www.skyrr.is/legal/disclaimer.txt">
http://www.skyrr.is/legal/disclaimer.txt</a><br>_______________________________________________<br>CentOS mailing list<br><a href="mailto:CentOS@centos.org">CentOS@centos.org</a><br><a href="http://lists.centos.org/mailman/listinfo/centos">
http://lists.centos.org/mailman/listinfo/centos</a><br></blockquote></div><br>