Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!helios!bcm!dimacs.rutgers.edu!seismo!uunet!bellcore!porthos!chaucer!rdm2 From: rdm2@chaucer.uucp (25362-roe mcburnett(H053)m000) Newsgroups: comp.lang.perl Subject: Re: lossage running perl script from crontab Message-ID: <1991Feb28.212358.342@porthos.cc.bellcore.com> Date: 28 Feb 91 21:23:58 GMT References: <1991Feb28.193638.4002@uvaarpa.Virginia.EDU> Sender: netnews@porthos.cc.bellcore.com (USENET System Software) Reply-To: rdm2@chaucer.UUCP (25362-roe mcburnett) Organization: Bell Communications Research Lines: 20 In article <1991Feb28.193638.4002@uvaarpa.Virginia.EDU> anderson@optical.squibb.com writes: > >When I run the following script from the csh prompt, it works fine. >However, when I try to run it from cron it doesn't quite work as >expected. >Here's cron_ping: ... >chop($result = `ping bozo 5`); # try for 5 secs to ping helix perhaps ---------^ ping is not in the path of the shell that cron spawned? >Why does it work from the shell and not from cron? > >Jay Anderson >anderson@optical.squibb.com Remember, cron uses sh (not ksh not csh) to run its commands. You might get better results by using the following: 0,5,10,15,20,25,30,35,40,45,50,55 * * * * ksh /usr/local/bin/perl /usr/local/bin/cron_ping -Roe McBurnett rdm2@chaucer.cc.bellcore.com