Free Web Hosting Forum
(#1 (permalink))
Old
quasihellfish's Avatar
Junior Member
quasihellfish is on a distinguished road
 
Posts: 10
Join Date: Jun 2008
Location: Varies
Default 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.
Reply With Quote
(#2 (permalink))
Old
Junior Member
labrador is on a distinguished road
 
Posts: 1
Join Date: Jun 2008
Default 06-23-2008, 01:21 AM

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:
Code:
<?php

chdir('./public_html/');

include_once './includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
drupal_cron_run();
Reply With Quote
(#3 (permalink))
Old
quasihellfish's Avatar
Junior Member
quasihellfish is on a distinguished road
 
Posts: 10
Join Date: Jun 2008
Location: Varies
Default 06-23-2008, 08:04 PM

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.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



Powered by vBulletin® Version 3.6.9
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0
vBulletin Skin developed by: vBStyles.com