Cron task error messages

Brainwrap - March 28, 2008 - 02:31

Hi there--I've set up a standard Cron task via Plesk for a fresh Drupal 5.7 site. I'm able to run cron manually without any issues. However, when I try to run it automatically via crontab, I receive the following status email:

/var/www/vhosts/brendalawrence.com/httpdocs/cron.php: line 1: ?php: No such file or directory
/var/www/vhosts/brendalawrence.com/httpdocs/cron.php: line 2: //: is a directory
/var/www/vhosts/brendalawrence.com/httpdocs/cron.php: line 4: /aquota.group: Permission denied
/var/www/vhosts/brendalawrence.com/httpdocs/cron.php: line 5: anon_ftp: command not found
/var/www/vhosts/brendalawrence.com/httpdocs/cron.php: line 6: syntax error near unexpected token `('
/var/www/vhosts/brendalawrence.com/httpdocs/cron.php: line 6: ` * Handles incoming requests to fire off regularly-scheduled tasks (cron jobs).'

Any suggestions?

Near the bottom of

cog.rusty - March 28, 2008 - 02:56

Near the bottom of http://drupal.org/cron it says:

Note that it is essential to access cron.php using a browser on the web site's domain; do not run it using command line PHP directly

"Using a browser" here means wget or lynx or curl, according to the examples on that page.

A cron task which tries to run the cron.php file directly with a file path (instead of an URL) won't work. For one, it does not refer to any specific site (or database). Also, the error messages show that the Drupal-relative paths contained in cron.php are wrong when it is run this way.

 
 

Drupal is a registered trademark of Dries Buytaert.