Setting Up Cron

I could not get a decent answer from the Drupal site on setting up the Cron jobs that it keeps complaining about. Nor would my hosting support people help ("That's a user problem...").

My hosting provider does not allow me to have Shell access (probably a wise move). But they do provide the more-or-less-standard cPanel function. On my version, the "Cron" entry is in the lower left.

I also had WebCalendar installed on one of my sites. When I went to cPanel, I noticed that WebCalendar had a command already set up. Modifying it a bit, this is what I came up with to put in:

cd '/home/username/public_html/' ; php -q 'cron.php';<

Note that username is my host's user ID for domain management and my Drupal installation is in my "root" folder (actually "public_html").

This worked for getting Cron run, but did generate some error messages.

I was happy that Cron ran, but a bit concerned about those messages. So I did some searching on the Drupal site and came up with several posts of the same messages, but no solutions. So I posted again. This time someone saw it through.

They suggested using WGET, but I don't have shell access. But I did, for some reason, check the "Advanced" mode on cPanel again. I noticed that there was now a helpful hint there (of course in a small font). It said to use GET< (obviously, use your own URL). I did and the error messages went away and Cron is working great!

For Cron jobs another possibility is<

For every page view, this module checks to see if the last Cron run was more than 1 hour ago (this period is configurable). If so, the Cron hooks are executed, and Drupal is happy. These Cron hooks fire after all HTML is returned to the browser, so the user who kicks off the Cron jobs should not notice any delay.


wget, cron, shell access

Just a note: you don't need shell access to use wget.
It's usually in system path, so you can just use "wget", or "/usr/bin/wget" if this doesn't work.
I've been using this method for years when I was on cPanel hosting with no shell access.

Hope it helps.

"Cron run failed" due to core Search

Thanks for starting the cron run failed thread:<

I posted as #23 to that thread you started almost two years
ago. I fixed my cron (manual run) by disabling search.

This process needs to give more debugging info when it
fails... It has continued to be a problem for many
drupal users over a long time period.

-Maine Bob OConnor

PS: I like your new name... has a great "detective" ring
to it. Have you heard of Hardy Drew and the Nancy Boys?
Here is that Irish Obama song that they wrote:<

More info would be nice

More info would be nice, but since no one wants to own the problem, it's not likely to happen. The main thing to do is to lower the search indexing threshold.