*BSD News Article 99964


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!news.mel.connect.com.au!munnari.OZ.AU!uunet!in2.uu.net!194.162.162.196!newsfeed.nacamar.de!fu-berlin.de!news.belwue.de!rubin.noc.dfn.de!schweikh
From: schweikh@rubin.noc.dfn.de (Jens Schweikhardt)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: Crontab in bsd
Date: 19 Jul 1997 14:57:34 GMT
Organization: Regional Network of Baden-Wuerttemberg, Stuttgart, FRG
Lines: 26
Message-ID: <5qqkku$676$1@news.belwue.de>
References: <01bc944d$afe75fa0$0422989e@allied.demon.co.uk>
NNTP-Posting-Host: rubin.noc.dfn.de
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:44677

In article <01bc944d$afe75fa0$0422989e@allied.demon.co.uk> "Bruce Davidson" <allied@pair.com> writes:
# I can't get any shell commands to operate in a crontab file. Perl scripts
# are ok but when I use e.g., zip etc..., the system reports when the
# scheduled time has arrived and nothing happened, "Zip:Not found". Since zip
# is in the path, why is this happening and what can I do about it.

1) Do you want to execute Zip or zip? Case matters with UNIX.
2) Are you *sure* zip is in the PATH that *cron* gives you?
   cron's PATH is very minimalistic, something like /bin:/usr/bin.
   It's *not* the PATH you get when logging in.
   Try adding PATH=$PATH:/usr/local/bin or wherever your zip is.
3) If from the crontab script you call other scripts:
   *None* of the variables cron gave you is exported.
   Not even PATH and LOGNAME.
   Have an explicit 'export PATH LOGNAME etc' in your script
   if you need to call other scripts.

 
Mail me if you got it going.

Regards,

	Jens
--
Jens Schweikhardt  http://www.uni-stuttgart.de/People/schweikhardt/home.html
SIGSIG -- signature too long (core dumped)