[drupal-support] Using Crontab For Aggregator

Chris Johnson chris at tinpixel.com
Mon Jul 11 21:02:06 UTC 2005


Rob wrote:
> I have tried the command line several ways:
> 
> 00 * * * * http://www.cmlhope.com/drupal/cron.php
> 
> and
> 
> 0,15,30,45       *       *       *       *       wget -q 
> http://www.cmlhope.com/drupal/cron.php
> 
> This the error message I am getting back now.


The first version above makes no sense:  you are asking the host machine to 
execute a URL directly as an executable binary program.

The second version makes sense, but may not work, depending on your host.  It 
is asking the machine to run the "wget" executable binary program with the 
parameters "-q" and "http://www.cmlhope.com/drupal/cron.php" -- which makes 
sense for wget because it is a program designed to fetch web pages from a 
supplied address.

However, the error message you are getting, "command not found," means exactly 
that.  In this case, it might well be the case that the program (command) 
"wget" is not being found, if it is the second version above that is producing 
that error message.

One reason it might not be found is that the wget program simply is not 
installed on your host.

Another reason is that it may be installed, but it is not in the default 
search path (the "path") for the cron program -- that is, the list of 
directories cron should look in to find programs it is asked to run.  If you 
know which directory on the host which is running the crontab the "wget" 
program is installed in, you can use its full path name to run it.  For 
example, if it is in the /usr/local/bin directory, your crontab entry might 
look like this:

00 * * * * /usr/local/bin/wget -q http://www.cmlhope.com/drupal/cron.php


--
Chris Johnson




More information about the drupal-support mailing list