On Fri, Dec 08, 2000 at 02:16:11PM -0600, Paul Thomason wrote:

| I've written a perl script on a Red Hat server to automate some of the
| processes I do at work (creating accounts, FTP'ing logs etc).
| 
| The script run great when run manually on the shell, but when placed in
| the cron table, the system commands do not seem to execute.
| 
| I've tried to find similiar reference in online manuals, but so far have
| come up blank.

There's a known bug in Redhat's cron daemon (I know 5.1 was affected,
not sure about later versions) where a signal is being caught and it
breaks things like this.  I think at is affected as well.

The fix is to add this to the beginning of your perl script.

   # fix for broken cron/at daemon under RedHat 5.1
   $SIG{CHLD} = 'DEFAULT';

Of course, it's also possible that your problem is just that you don't
have $ENV{"PATH"} set properly.  Set it explicitly in your script.

-- 
Doug McLaren, [EMAIL PROTECTED]
I find this corpse guilty of carrying a concealed weapon and I fine it $40.
                -- Judge Roy Bean, finding a pistol and $40 on a man he'd
                   just shot.
---------------------------------------------------------------------------
Send administrative requests to [EMAIL PROTECTED]

Reply via email to