Date: Tue, 9 May 2000 22:08:21 -0500 From: "Daryl Chance" <chancedj@intertek.net> To: <freebsd-newbies@FreeBSD.ORG> Subject: Re: cron woes -fixed! Message-ID: <005001bfba2d$0032ff20$0200000a@gateway.intertek.net> References: <B53DB2E9.144C%snowick@learn2.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Because (I assume) the cron is actually run as that user, not logged in as that user. When you log in, you run scripts to set paths, a cron job does not have paths specified, so you have to spefically say where :) If I'm wrong, someone will say so...hopefully I know some about freebsd and am at least somewhat right :). Daryl Chance chancedj@intertek.net ================================ #define QUESTION ((bb) || !(bb)) - Shakespeare ----- Original Message ----- From: <snowick@learn2.com> To: <freebsd-newbies@FreeBSD.ORG> Sent: Tuesday, May 09, 2000 2:19 PM Subject: Re: cron woes -fixed! > Hmm, the one thing I didn't try! I had to use full paths for both command > (rsync) AND ssh (option to rsync). Hmmm, anyone know why? > > Anyway, it works now and I am elated.... > > > From: snowick@learn2.com > > Date: Tue, 09 May 2000 11:36:56 -0700 > > To: <freebsd-newbies@FreeBSD.ORG> > > Subject: cron woes - please help! > > > > Hi everyone- > > I've read everything I can on setting cron jobs and tried a few myself but > > I'm getting a lot of errors and really need a few of these crons to work. I > > don't see anything in the Handbook about cron paths & variables which seem > > to be part of the problem. > > > > Running FreeBSD3.4, I have an id whose cron job has it run an rsync of files > > on another server. When I run the command as a command line, it works > > beautifully (I have the ssh-password thing worked out, that's not the > > problem). The error I keep getting seems to be regarding the id's paths - I > > get rsync: command not found errors (it's in /usr/local/bin) but when I look > > at the crontab error email there are a bunch of X-Cron-Env settings that > > don't match the ids ENV setting (see below - especially PATH=) Does anyone > > know how I modify the X-Cron-Env? Or even what/why it is? > > > > I changed the command to /usr/local/bin/rsync but then I get the same error > > for ssh (also in /usr/local/bin). How do I add /usr/local/bin to cron's > > paths? > > > > + + + + + + + + + + + + + + + + + + + + + + + > > Date: Tue, 9 May 2000 11:15:00 -0700 (PDT) > > Message-Id: <200005091815.LAA18763@www2.serverB.com> > > From: root (Cron Daemon) > > To: learn2 > > Subject: Cron <myid@www2> rsync -av -e ssh --exclude 'cgi-bin' > > serverA.com:/hom > > e/learn2/htdocs /usr/local/share/apache >> ~/sync.log 2>&1 > > X-Cron-Env: <SHELL=/bin/sh> > > X-Cron-Env: <HOME=/home/learn2> > > X-Cron-Env: <PATH=/usr/bin:/bin> > > X-Cron-Env: <LOGNAME=learn2> > > X-Cron-Env: <USER=learn2> > > > > rsync: not found > > > > Any ideas? Thanks- > > rrrrrobot > > > > > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > > with "unsubscribe freebsd-newbies" in the body of the message > > > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-newbies" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-newbies" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?005001bfba2d$0032ff20$0200000a>