Free Web Hosting Forum
Go Back   Free Web Hosting Forum > Website Building > Content Managament Systems
Reload this Page Drupal: How to cron with 000webhost?
Reply
 
Thread Tools Display Modes
(#1 (permalink))
Old
quasihellfish's Avatar
Junior Member
quasihellfish is on a distinguished road
 
Posts: 16
Join Date: Jun 2008
Location: Varies
Default Drupal: How to cron with 000webhost? - 06-06-2008, 06: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: 16
Join Date: Jun 2008
Default 06-23-2008, 02: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: 16
Join Date: Jun 2008
Location: Varies
Default 06-23-2008, 09: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
(#4 (permalink))
Old
Junior Member
engineer2 is on a distinguished road
 
Posts: 5
Join Date: May 2009
Default 05-31-2009, 06:12 PM

I have also had issues with drupal and cron on 000webhost. I added the chdir line to the cron.php file and I couldn't get it to work. I had set the cron job to run every 5 minutes but it never worked. For the command i put in public_html/cron.php

Nothing worked. I even tried it without the chdir command in the cron.php file and that didn't fix it either. Before I sumbit a ticket I would like to know if I am doing something wrong. Anyone have any suggestions?
Reply With Quote
(#5 (permalink))
Old
Junior Member
square is on a distinguished road
 
Posts: 2
Join Date: Oct 2010
Default Same problem - 10-07-2010, 08:23 AM

I have a very same problem here. Tried all the suggestions - none of them seem to be working. There has to be a decision!
Reply With Quote
(#6 (permalink))
Old
Junior Member
blOOr is on a distinguished road
 
Posts: 1
Join Date: May 2011
Default 05-22-2011, 09:00 PM

I've tried like all the possibilities on the google.
I've got a free domain, and none of the solution worked for me.

I know how to fukin set a cron job, already did it on other web hosts flawless, but this shit is not working. And no one from the staff gave a valid response.

THIS IS SHIT ! If anyone disabled the Cron Jobs for FreeACcounts fukin tell us so we don;t try to re-invent the internet.

PS: This is outrageous, fukin outrageous.
PPS: Mi-as pwla in snagele vostru de sparti !

Have a fukin awesome day.

Have a nice day
Reply With Quote
(#7 (permalink))
Old
lobrc's Avatar
Retired Administrator
lobrc has a reputation beyond reputelobrc has a reputation beyond reputelobrc has a reputation beyond reputelobrc has a reputation beyond reputelobrc has a reputation beyond reputelobrc has a reputation beyond reputelobrc has a reputation beyond reputelobrc has a reputation beyond reputelobrc has a reputation beyond reputelobrc has a reputation beyond reputelobrc has a reputation beyond repute
 
Posts: 4,984
Join Date: Jan 2010
Default 05-22-2011, 10:14 PM

Quote:
Originally Posted by blOOr View Post
I've tried like all the possibilities on the google.
I've got a free domain, and none of the solution worked for me.

I know how to fukin set a cron job, already did it on other web hosts flawless, but this shit is not working. And no one from the staff gave a valid response.

THIS IS SHIT ! If anyone disabled the Cron Jobs for FreeACcounts fukin tell us so we don;t try to re-invent the internet.

PS: This is outrageous, fukin outrageous.
PPS: Mi-as pwla in snagele vostru de sparti !

Have a fukin awesome day.

Have a nice day
Calm down dude


FREE SCRIPT INSTALLATION SERVICE | PREMIUM HOSTING* | LOBRC.NET

*All packages include Quality Support, Website Builder, Free Site Migration, 30 Day Money Back Guarantee, Official cPanel and Fantastico Autoinstaller.

Plus get 20% off with promo code 000WH20. Contact sales for more information.
Reply With Quote
(#8 (permalink))
Old
Senior Member
Surreal Scripts is on a distinguished road
 
Posts: 115
Join Date: May 2011
Default 05-24-2011, 07:20 AM

Quote:
Originally Posted by blOOr View Post
I've tried like all the possibilities on the google.
I've got a free domain, and none of the solution worked for me.

I know how to fukin set a cron job, already did it on other web hosts flawless, but this shit is not working. And no one from the staff gave a valid response.

THIS IS SHIT ! If anyone disabled the Cron Jobs for FreeACcounts fukin tell us so we don;t try to re-invent the internet.

PS: This is outrageous, fukin outrageous.
PPS: Mi-as pwla in snagele vostru de sparti !

Have a fukin awesome day.

Have a nice day
Wow dude, calm down. As a free user you get what you pay for.
Reply With Quote
(#9 (permalink))
Old
Junior Member
ShankedS is on a distinguished road
 
Posts: 3
Join Date: May 2011
Default 05-24-2011, 09:30 PM

So, uh, are there any good sites for learning about cron and how to use it? I've got some ideas for some automated PHP scripts I'd like for my site to run on a time-basis rather than waiting for a user to come and click a page or link.
Reply With Quote
(#10 (permalink))
Old
Junior Member
Chip Before PCs is on a distinguished road
 
Posts: 7
Join Date: May 2011
Default 06-07-2011, 11:18 AM

Hey, I'm sure this helps but I've been able to "manually run cron" from within Drupal the one thing I've noted (probably because I don't have much content) is in Search Settings to set "Number of items to index per cron run" to as low a number as possible (i.e. 10). From there if you click on "cron maintenance task" which takes you to Status Report and scroll down to Cron Maintenance Task just below the heading there is a link "Run Cron Manually" when I click on it, it comes back as "Cron Ran Successfully"

What this tells me is that 000webhost has not done anything to actually block the php script from running... but there maybe an issue with running it automatically?!

Hope this helps...

Chip
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

BB 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.8.2
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.5.2
vBulletin Skin developed by: vBStyles.com