Seems to be an great module, but I need some extra info on the way it is working.
Basicaly, I have a huge batch process that it suppose to run every night, and I would like to launch it throught a cronjob.

How do I programmaticaly use the "batch background process" is it possible ?
Thanks ,
Marc

Comments

gielfeldt’s picture

Hi

background_batch_process_batch() can be used to start a background batch process, just like would with batch_process(). "Background Batch" needs to be installed. You could also just create a regular cron job and the use Ultimate Cron, which uses Background Process to run jobs.

mkalbere’s picture

Just .... wonderful !

gielfeldt’s picture

Did this solve it for you?

I've also added some documentation for this on the project page for Background Process

mkalbere’s picture

Status: Active » Closed (fixed)

Hello,
Sorry for answering that late .. the project has been delayed ;-)

I transformed my batch using background_batch_process_batch, and after configuring the settings.php (mono server), it seems to partially work. "Seems" because nothing was imported/created (the targeted procedure synchronizes ~1500 nodes everynight).
I supposed that it is the cron that launch the "background processes", but that process finished without importing anything.
I went a bit around your code, but there was too many interactions to make it easy to understand.
On the other hand, I discovered the "Drupal Queue API", that allow me to fit my needs in a couple of minutes , so for that time I choosed the "easy" solution.

But now that I discovered "background process", be sure that I'll soon come back to that module, that would simplify the setup of other stuff ... next time.
Thanks for your help anyway !
Marc