PDA

View Full Version : Problem running cron job


jerrywin5
04-06-2004, 09:21 PM
I am able to run the spider from the shell and index URLs in a file using
php -f spider.php newurls.txt >> spider.log
However, when I setup a cron job using
0 1 * * * php -f spider.php newurls.txt >> spider.log
it does not work. I get the following error:
/bin/sh: php: command not found
and do not know why. Which command is the error referring to? What do I need to change?

Any help would be appreciated.

Charter
04-10-2004, 04:07 PM
>> Which command is the error referring to?

Hi. Looks like it refers to PHP as not found. Perhaps try the following instead:


0 1 * * * /full/path/to/php -f /full/path/to/spider.php /full/path/to/newurls.txt >> /full/path/to/spider.log