Re: cron problem
Richard Reina <[email protected]>
| Newsgroups | gmane.org.user-groups.luni.tech |
|---|---|
| Message-ID | <[email protected]> |
Hello All, Thanks much for the replies thus far. When I do: [root@tomsawyer richard]# env | PATH I get: PATH:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin Are you saying that I should put that exact line including the word PATH at the top of cron file like this? PATH:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin 1 9 * * 1 /usr/bin/perl /usr/local/src/scripts/inactive.pl 1 14 * * 1-6 /usr/bin/perl /usr/local/src/scripts/upcoming.pl ---- Linux Users Of Northern Illinois \(Chicago\) - Technical Discussion <[email protected]> wrote: > > Ola, > > On Wed, 2011-01-12 at 16:01 -0500, Richard Reina wrote: > > If I cut and paste the exact command from crontab -l and execute the > > prgram manually from the console I don't get this error. I don't > > understand why cron has this problem? > > It isn't a problem with cron. It's not finding something in your path > that it needs. > > do this: > > env | grep PATH > > Take the line that gives you, and then add it to the top of the crontab > file. > > Also, if you set the MAILTO variable in cron, you'll get the emails (or > whomever will) for it's output. > > Here's what mine looks like: > > > PATH=/home/scott/bin:/opt/metasploit3/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games > [email protected] > 30 * * * * "/opt/metasploit3"/bin/msfupdate > /var/log/msfupdate.log 2>&1 > 1 * * * * /usr/bin/svn update /opt/metasploit3/msf3/ >> /var/log/msfupdate.log 2>&1 > * * * * * cd /var/www; php -f cron.php > /dev/null 2>&1 > > > -- > W. Scott Lockwood III <[email protected]> > LRSE Hosting > > -- > Linux Users Of Northern Illinois (Chicago) - Technical Discussion > http://luni.org/mailman/listinfo/luni > -- Richard Reina Rush Logistics, Inc. Watch our 3 minute movie: http://www.rushlogistics.com/movie -- Linux Users Of Northern Illinois (Chicago) - Technical Discussion http://luni.org/mailman/listinfo/luni