cron: command not found ???

cron: command not found ???

Post by Joe Dupr » Sun, 21 Jul 2002 02:58:14



I've been manualy running ntpdate to sync my clock to a ntp server.  I
finally got the bright idea to have cron do this, but for some reason cron
sends me an email instead saying "/bin/sh: ntpdate: command not found".

Now when I am logged in as root, the command runs fine.  ntpdate is located
in /usr/sbin.  Do I need to link this to some other directory so cron can
find it?

System is RH linux 7.0

Thanks,

- Joe

 
 
 

cron: command not found ???

Post by Dave Uhrin » Wed, 24 Jul 2002 06:30:59



> Do I need to link this to some other directory so cron
> can find it?

No, you need to specify the full path to ntpdate in the crontab.

0,20,40 * * * * /usr/sbin/ntpdate 192.168.0.6 > /dev/null 2>&1

 
 
 

cron: command not found ???

Post by Floyd Davidso » Wed, 24 Jul 2002 08:33:44



>I've been manualy running ntpdate to sync my clock to a ntp server.  I
>finally got the bright idea to have cron do this, but for some reason cron
>sends me an email instead saying "/bin/sh: ntpdate: command not found".

>Now when I am logged in as root, the command runs fine.  ntpdate is located
>in /usr/sbin.  Do I need to link this to some other directory so cron can
>find it?

Provide a full pathname to the command in your crontab.

--
Floyd L. Davidson         <http://www.ptialaska.net/~floyd>

 
 
 

1. error by doing a cron job...command not found...please help!!!

hi,
i install a cronjob to activate webalizer once a day...

crontab -l    answers:

SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin
MAILTO=admin

22 2 * * * admin /bin/webalizer -n www.discount.de -o
/www/vhtdocs/discount/statistik /www/vhtdocs/discount/log/access_log

when time is come i get a mail message:
/bin/bash: admin: command not found

when i use the cron command in a telnet line it works.

plese help!

2. accurate time

3. Cron: root: command not found

4. IDE ethernet card on SuSE?

5. CRON: /bin/bash: root: command not found

6. Cooperation between XFree and GGI

7. Need to find vi command to remove ^H from command man find > find.txt

8. CDROM mounting and symbolic link problems in Redhat 6.0

9. ?updatedb: @find@: command not found???

10. command not found not solved with ./

11. Cron can't find lastrun/cron.hourly

12. Crond help: Script Runs from command line, but not from cron

13. crontab: you are not authorized to use the cron command