How to run CRON jobs using CURL on lunarpages webhost

How to run CRON jobs using CURL on lunarpages webhost

I have wrestled for a long while with a problem that has plagued many people. Just witness the number of postings with problems about how to run CRON on this or that web host system. Does the system allow wget or lynx? Does it support running PHP from the cron tab in cpanel? You have to run cron from a browser, need to use 'curl' and what does that mean?

A classic error that is seen in the confirmation email (if cron sends you results via email) is:
Warning: include_once(./includes/bootstrap.inc): failed to open stream: No such file or directory in /home/SiteNameHere/public_html/drupal/cron.php on line 9

So, at least if you are hosted by www.lunarpages.com (LP), here is the definitive answer including how to run cron for multi-site installations. LP does NOT support either wget or lynx and running PHP on the cron command line will not properly invoke the cron.php.

LP supports curl (a/k/a cURL). Some examples of commands that work:
curl --silent --compressed curl http://sub.site.com/cron.php > /dev/null 2>&1 (this will trigger the sub-site silently)
curl --silent --compressed curl http://site.com/cron.php > /dev/null 2>&1 (for a single site installation)

The ' > /dev/null 2>&1' part suppresses sending you an email for each execution.

So, enter cpanel, click on the CRON icon, and using either the simple or the advanced mode, those are the commands that work.
Hope this helps someone.

gil

0 comments :

 
Copyright © 2015. JAY Galaxy