Date: Sun, 2 Jan 2000 22:45:33 +1030 (CST) From: Justin Hawkins <justin@tardis.mx.com.au> To: Pekka Savola <Pekka.Savola@netcore.fi> Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Huge crontab jobs are not run Message-ID: <Pine.BSF.4.21.0001022242070.89416-100000@gw.tardis.mx.com.au> In-Reply-To: <3.0.6.32.20000102140829.008136d0@netcore.home>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 2 Jan 2000, Pekka Savola wrote: > >Well, I'd guess you're looking in the wrong place. This has nothing > >to do with cron. > > Sorry, I don't quite understand this. If this has nothing to do with > crontab, *what* does it have to do with then? > > I run /usr/local/sbin/logrotate from the shell: > > bash-2.03# /usr/local/sbin/logrotate > [works fine] > > I add it to /etc/crontab: > > 1 0 * * 1 root /usr/local/sbin/logrotate > [Won't be run] > > I fail to see what *could* be wrong with the script because it works on an > interactive shell session just fine. cron jobs are typically run with a different environment than a login shell. The most important difference is probably the PATH environment variable. On my system programs run from cron have only /usr/bin and /bin in their path. If your script uses programs in /sbin or /usr/local/bin without using absolute pathnames it will fail. Are you checking root's mail - you might be getting error messages from your script going there. If you are using bash, try: export PATH=/usr/bin:/bin then run your script again from the shell and see if it still works. - Justin To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0001022242070.89416-100000>