[development] Batch API on cron

Neil Hastings neil.hastings at gmail.com
Thu Jul 15 14:00:44 UTC 2010


http://drupal.org/project/job_queue  I use it all of the time and it works
great.  Sometimes I will make a custom module with a system weight lower
then job_queue and ini_set... in hook_cron to increase a timeout if needed.

Cheers,
Neil

On Thu, Jul 15, 2010 at 9:11 AM, Ken Winters <kwinters at coalmarch.com> wrote:

> unset() and paging your batch chunks with LIMIT are the standard strategies
> if
> you wrote the cron yourself.
>
> You might also be able to use ini_set('memory_limit','200M'); but actually
> using
> less memory is generally preferable.
>
> - Ken Winters
>
>
> On Jul 15, 2010, at 9:04 AM, Ken Rickard wrote:
>
>  Drush scripts (especially bulk node processing) are subject to hitting
>> PHP memory limits when processing large amounts of data.
>>
>> Anyone have ways around that issue?
>>
>> On Thu, Jul 15, 2010 at 8:49 AM, Moshe Weitzman <weitzman at tejasa.com>
>> wrote:
>>
>>> I think drush scripts are your best bet. CLI PHP is not not subject to
>>> timeout.
>>>
>>> On Thu, Jul 15, 2010 at 5:01 AM, Sven Decabooter <sdecabooter at gmail.com>
>>> wrote:
>>>
>>>> Hi,
>>>> I'm reading contradicting posts about running Batch API processes on
>>>> cron.
>>>> This is for Drupal 6 BTW.
>>>> I have tried implementing a batch functionality that should be run on
>>>> cron,
>>>> but it doesn't seem to process the work that needs to be done.
>>>> I assume this is because running the cron through a commandline command
>>>> doesn't allow for javascript...
>>>> So my questions:
>>>> - Have I implemented Batch API incorrectly, and should it normally work
>>>> also
>>>> on cron?
>>>> - What is the best way to run a process that would normally trigger a
>>>> php
>>>> script timeout? Can I use the Queue module for that?
>>>> I'm sure plenty of people have already tried doing this, so I'm not sure
>>>> why
>>>> I can find little consistent information about it.
>>>> Thanks for your feedback.
>>>> Sven
>>>>
>>>
>>>
>>
>>
>> --
>> Ken Rickard
>> agentrickard at gmail.com
>> http://ken.therickards.com
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20100715/b461677e/attachment.html 


More information about the development mailing list