Here is a working format for Drupal Cron tasks on hostgator.com.

After much hunting around, as one often has to do, I have found a working format. It's a shame the host's help files are not more forthcoming with this information. I had to trawl through lots of forum posts to find this.

POST http://www.yourdomain.com/cron.php /dev/null

I strongly recommend that you rename your cron.php file, or else anyone can run it.

You can also run cron via PHP using the command below.  Note: this will only work for single-site installations.  For multi-site installations use the POST command above.

/usr/local/bin/php -q /home/[username]/public_html/cron.php

Well... good thing I found this post.

Thomas Harris (not verified) on Tue, 01/08/2008 - 03:18

Apparently curl is not enabled by default on user accounts and must have a request submited. We'll see how long it takes to have that issue settled. Even so, one of my sites has nothing but RSS feeds which need to be updated every 15 minutes. Without your post I would have waited 12+ hours for a resolution. Hooray!

Thanks, this seems to work.

George Cassie (not verified) on Tue, 01/08/2008 - 03:18

Thanks, this seems to work.

Thanks!

Mike Wheaton (not verified) on Sat, 06/14/2008 - 20:21

After many, many failed tries with other format this one actually worked for me on HostGator. Thanks very much for posting this!

Umm...

Ryan (not verified) on Thu, 01/08/2009 - 01:52

The code above requires user input (which obviously cron will not do), I would recommend using:

GET http://www.example.com/cron.php /dev/null

found a solution that works

kostas (not verified) on Wed, 07/01/2009 - 12:16

had the same issue and filed a ticket at hostgator
the right command would be:

/usr/local/bin/php -q /home/[username]/public_html/cron.php

for a drupal installation at the root of the server,

hope this helps

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <img>
  • Lines and paragraphs break automatically.

More information about formatting options