[development] cron woes - drupal_cron_cleanup() kills my, cronjob while it's still running...

Liam McDermott liam at intermedia-online.com
Sat May 24 04:29:07 UTC 2008


> On Fri, May 23, 2008 at 7:25 PM, Arthur Richards <awjrichards at gmail.com> wrote:
> Thanks - I've already done that though. In fact, I have turned the time
> limit off (set_time_limit(0)). I don't think the problem is the size or
> duration of my scripts - maybe it is, but the watchdog message is a
> product of drupal_cron_cleanup, which I thought isn't supposed to be
> called until everything's done running, since it's called with
> register_shutdown_function() in drupal_cron(). I can't figure out what
> could be getting drupal_cron_cleanup to execute before my cron scripts
> finish.

Another cron would cause those functions to be run. If the cron 
semaphore in {variables} is older than one hour, cron will delete it and 
run again (if I remember correctly).

The problem is almost certainly the duration of time those scripts are 
taking to run. Processing information in smaller chunks (or splitting up 
any complex queries) will stop this problem and be less strain on the 
server. :)

There's some cool batch malarkey in Drupal six that could help you: 
http://api.drupal.org/api/group/batch/6

Kind Regards,
Liam McDermott.


More information about the development mailing list