When using the batch API, can I setup multiple batch jobs or can I only setup one batch with multiple operations? I ask because of a data migration I am doing.

Also, will it run the batches and operations in the order they are received or are they run concurrently? I need to have some items imported before others. So I am concerned about this.

1 Answer 1


You can call batch_set() more than one time, and batch_process() will execute all the batch sets that have been set with every call to batch_set().

Normally a module will call batch_set() once, and pass as $batch['operations'] an array containing all the functions to call, but if two different modules are setting their own batch sets, they will be both executed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.