OK, I have a cron job setup to run wget http://mydomain.com/cron.php every few minutes. And the cron job is being executed by Linux on schedule. The only problem is that for some reason or another cron.php does not do anything (not even generate the "run complete" message) when invoked via either wget or mozilla. But oddly enough when I manually invoke it from IE, it works fine. Any clues as to what could be causing this? Drupal 4.32 is running on a Fedora Linux box with Apache 2.x.
Thanks!

Radi Shourbaji

http://radi-shourbaji.blogspot.com

Comments

NaSPA1’s picture

No error messages are being generated either when invoking cron.php from Mozilla, in the output files captured by wget or lynx, nor are any messages recorded in either watchdog or the apache logs.

bertboerland’s picture

i have had many problems with cron not completing. usually it hapens when a site in the cloud isnt reachable.

best way to troubleshoot is
* look in watchog
* see if a site from the cloud isnt updated for some time
* see if a rss feed hasnt een updated for sometime (in that order)
* update site by hand ("update now")
* start a wget from cli
* look in system logging
* start a php /dir/cron.php by hand, this will tell you what is wrong

dont trust ie. this holds true in general :-) but the page you are viewing in ie can be made by ie instead of the webserver. i dont believe that ie will update cron and a wget or mozilla client wont (and if this is the case, maybe ipchains is blocking your wget/mozilla host?)

it seems the only thing you havent tried is php by hand. try it.

once i started a couple of wget cron's simultaneously (in 4.4 there is a real lock mechanisme) and that solved the problem.

hope this helps...

--
groets

bertb

--
groets
bert boerland

NaSPA1’s picture

Until I read your post, it didn't even occur to me to try running cron.php from the command line. When I did, I found messages saying something to the effect that "no recipients specified for the message". So I started turning off modules that generate email one by one until this symptom disappeared. And in this case it seems the banner module was the culprit. After commenting out the lines in it responsible for generating it' reports (I don't need them anyway) - the problem went away and all is well.

Radi

nautis’s picture

Hi. The problem I'm having is that cron.php is not getting run on it's own. It works find when I run it myself. Do cron jobs need to be scheduled at the OS level? If so, is there a way for those of us using an ISP to schedule these jobs? Thanks for any help.

- Matthew

rino’s picture

The cvs release and cron are not working for me... it was working before to update my news feeds, and to use the notify module (although that itself had bug identified).

Anyway, if I run this from cli (which is how i have been invoking the cron.php job):
% curl http://mysite.mydomain.edu/drupal/cron.php

this is returned:

<b>Fatal error</b>:  Call to undefined function:  variable_get() in <b>/Library/WebServer/Documents/drupal/includes/common.inc</b> on line <b>1239</b><br />

I can manually update the news feeds however.

QV’s picture

I have exactly the same situation. Upgraded from 4.3.2 to 4.4.0-rc.
cron.php was working before (I use http://uptime.openacs.org/uptime/
to run it). Now I only get the same "Fatal error..." message in apache
error_log.

killes@www.drop.org’s picture

You did apparently not update your cron.php script.

usharf’s picture

it seems that for me, with 4.4 (CVS) when using my hosting crontab in the control panel using something like: php /home/usharf/usharf.com/cron.php

I get the follwing error messages sent to me:

PHP Fatal error:  Call to undefined function:  db_query() in /hsphere/local/home/usharf/usharf.com/includes/bootstrap.inc on line 29

When I run it from the browser ro using curl/wget etc it seems ok. Did anyone notice this before?

10x
Uri

killes@www.drop.org’s picture

This is known, you need to access the site by its url so that the right config file is loaded.

mishaikin’s picture

I have simillar problem running 4.6.0 drupal. Only logged user could produce "Cron run completed" in the logs. Neither lynx, or wget, or curl could indicate in the logs that the cron is working.
Is it a bug or? I even tried to anonymously visit my cron.php through the firefox browser - nothing in the logs .....