[Techtalk] Newbie & crontab

Conor Daly conor.daly at cod.utvinternet.com
Tue Nov 16 07:02:05 EST 2004


On Mon, Nov 15, 2004 at 11:29:18AM -0800 or so it is rumoured hereabouts, 
Carla Schroder thought:
> On Monday 15 November 2004 8:17 am, Conor Daly wrote:
> > On Mon, Nov 15, 2004 at 01:03:01PM +0000 or so it is rumoured hereabouts, 
> > Conor Daly thought:
> > > 
> > > In the meantime, to get you started:
> > > Try creating a script with your command in it like this:
> > > 
> > > o echo "#!/bin/bash" > myscript
> > > o echo $PATH >> myscript
> > > o vi myscript
> > 
> > ICK!! Got that wrong!  It's more like this:
> > 
> > o echo '#!/bin/bash' > myscript
> > o echo "PATH="$PATH >> myscript
> > o vi myscript
> > 
> > Note the use of single quotes rather than double and the "PATH=$PATH"
> > rather than just $PATH
> > 
> 
> This is all very kewl and geeky, but I'm not getting why it's necessary. If 

And there needs to be another reason? :-)

> you use the full pathname to your command or script in the crontab, why do 
> you need all this other stuff?

It depends on what you're doing.  If your script in turn calls other
commands, they'll need the environment info too.

Conor
-- 
Conor Daly <conor.daly at oceanfree.net>

Domestic Sysadmin :-)
---------------------
Faenor.cod.ie
  8:06pm  up 15 days,  3:58,  0 users,  load average: 0.00, 0.10, 0.30
Hobbiton.cod.ie
 19:54:58  up 19:56,  1 user,  load average: 0.00, 0.00, 0.00


More information about the Techtalk mailing list