cron

Branjawn's picture

Need to Vent

Instead of actually accomplishing things the past week I've been trying to debug... Drupal, my install, MySQL. I literally spend ALL day working (not for pay) on this.

Cron will not run. It fails indefinitely.
I finally got one install (I duplicated my site on another server, with the same error) to work by uninstalling getID module. So I go to the other install and do the same thing, nothing.

52 comments · Read more
Branjawn's picture

Cron error messages

I keep getting this error message when running cron. I've spent a good amount of time researching but haven't found anything addressing bootstrap.inc specifically. Any insight?

<b>Warning</b>:  session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cache limiter - headers already sent (output started at /home/focfouuo/public_html/includes/bootstrap.inc:1037) in <b>/home/focfouuo/public_html/includes/bootstrap.inc</b> on line <b>1037</b>

Can anyone tell I need a hack night soon?!?!? :)

11 comments
Branjawn's picture

Most frustrating Drupal encounter thusfar (and hopefully ever!)

So, I don't even know where to begin.

I am importing iCal feeds (Google Calendar specifically) using FeedAPI, Calendar, iCal parser, Date, etc, etc. I had some crazy issues that are mostly resolved now. But my one hangup I cannot remedy.

Cron will not stop running. In other words, I cannot run cron because it won't stop. If I try to run it manually I get the "Cron run Failed" or something like that.

I have done everything with deleting the cron variables, emptying cache, sacrificing small animals, hung a horseshoe over my pc, all to no avail.

13 comments · Read more
gallamine's picture

How to set up a cron job on a site that's protected with .htaccess/.htpasswd?

Howdy,

I'm trying to set up a cron job to run my cron.php file every hour. I've read through the docs on cron on Drupal.org (http://drupal.org/cron), and I tried executing the following commands, just to test:

wget -O - -q -t 1 http://www.example.com/cron.php

OR
curl --compressed http://example.com/cron.php

The problem is is that I have a .htpasswd file on my site that restricts access, and curl and wget can't get to the page.
So, is there an easy way of allowing them to access the cron.php files?

3 comments · Read more
shirleyto's picture

Running Cron Manually

Hi there,

I'm trying to run cron manually for the site search feature but it's giving me this error:

 Fatal error: Call to undefined function the_time() in <<site path>>includes/common.inc(1646) : eval()'d code on line 55

I took a look at common.inc and bootstrap.inc but I don't think what I'm looking for is in either of those files...? What should I look at?

Thanks.

-shirley

2 comments
DamienMcKenna's picture

(even more) Advanced Cron

I've toyed with this idea for a few months..

A common problem with cron tasks in Drupal is that it is generally an all-or-nothing proposition, either every time you run cron.php the system runs every individual cron task, or (possibly for n00bs) you don't run it at all. Then there's the problem that some tasks need to be ran frequently, e.g. search index refreshing vs tag cloud updates vs RSS feed aggregation vs scheduler updating..

What I propose is rewriting cron.module to allow individual cron tasks be scheduled differently.

There would be three parts to it:

8 comments · Read more
ultimike's picture

Best Practices

Hello, I'm in the process of building a site that sells tickets to events using ubercart. I'd like to be able to have a rule that automatically unpublishes the event node when the event date passes.

For the most part, I've been able to do this but there's still a question in my mind as to whether or not I've done it the best way. Here's a quick synopsis of what I did:

  1. Created an "event" content type (actually an ubercart product class).
  2. Added a date field to the "event" content type (field_dates).
  3. Created a rule that is run on cron.
  4. I did not include any conditions.
1 comment · Read more · 1 attachment

Patch for Multi-Threaded Cron Jobs Created

So, we have a few modules that we are running for a new client. We're running drupal on about 60K worth of hardware, not including the Oracle database sitting on it's own nice slice of hardware (about 4 tearbytes of data).

So we get data once a week, millions of rows of data (60 million+). The module that we made for the client has a cron job that runs through and makes some updates (this is along with a Database-side PL\SQL script, and a sprinkle of java. A nice orchestra of apps that work beautifully togather). Well, this takes days to do. Literally days, and we noticed a problem when the "aggregator" failed because it through an error trying to read a certain RSS feed. We were not aware of this for about a week. This cost us and our customer prescious time because since aggregator had filed, the clients custom module never got to run!!! Futher more, I concluded that if I put the custom module first, it would eat up all the cron run time. On top of than, we were seriously "under" utilizing our hardware. This was just totally unaccepatble. Thus comes "Mutli-Threaded Cron" runs.

What this does bascially is fire each modules cron run in it's own "sandbox" if you will. So that each modules cron run has the FULL use of PHP's time out, and does not have to worry about another modules cron run failing. The multi-threaded cron also gives more detailed information about each modules cron run. This will better help site admins control the PHP time out variable (which can now also be set dynamically), and see what modules are taking hte most time to run, the least time, and which ones are currently failing.

I believe this is a BIG improvment over the current cron implementation.
Some items I would like to implement next:

  • Emailing the admin if these is a "cron run fail" escalation (say in a 20 min. period, there are 10 failure, email me), etc.
  • Being able to set each modules individual PHP execution time variable. (be nice to give search.module more time than aggregator module)
  • "Throttle" the cron runs. Meaning, I only want to have 5 cron "threads" running at any given time. So it needs to wait until a few have finished before running more cron threads.

You can review the patch and a detailed discussion of it here: http://drupal.org/node/87528
I'll be discussing more options for mutli-threaded cron runs on my blog: http://www.eb3it.com

Below is a snipped from my blog:

<br/><br/><br/>

So, I have started an ambitous patch. For those who do not want to read the explination, and just gain knowledge by reading the patch:

6 comments · Read more
Syndicate content