Drupal: How to cron with 000webhost? -
06-06-2008, 05:29 PM
Has anyone figured out the right Cron command that works on 000webhost in order to run the cron maintenance tasks with Drupal 6? I'm trying to use the cPanel, and none of my efforts seem to do anything... Thanks.
When the system runs your cron jobs, the current directory is /home/axxxxxxx/ rather than /home/axxxxxxx/public_html. The cron.php program will refuse to work because it can't find necessary .inc files. Adding a chdir command to switch to public_html directory in cron.php will solve this problem. Here's an example:
OK, I can handle that. But am I okay running the cron.php file directly via a cron job (e.g., just adding "public_html/cron.php" to the cron command)? This seems to be the only command that 000webhost lets me run. The Drupal help documents specifically frown on that behavior, stating that I should be using wget or lynx to access the cron.php from a browser. That was the original intent of my question.