[clug] running fortune from cron.

Nemo -earth native- nemo at cheeky.house.cx
Wed Sep 10 11:36:01 EST 2003

On Wed, Sep 10, 2003 at 11:23:33AM +1000, John Griffiths did utter:
> Hash: SHA1
> and disco!
> Thanks all for your help.
> John.
> Mark Harrison wrote:
> > Hi,
> > The environment might not be the same inside cron? Maybe try absolute
> > paths like '/usr/games/fortune'
> >

It occurs to me that there are three ways to do this. 
One is to use an absolute path... 

Another is to declare the $PATH within the script

The other is to declare the path within the cron environment.
(This last is my preferred - I have at least one script which checks for
$INSIDECRON=true to determine how it should act. Also good for procmail
sorting that one has been :)

  ------------------------------------------ --------------------------
                                                    earth native

More information about the linux mailing list