Max Concurrency for JSBatchJob


Is there a way to set the max concurrency per-node for a JSBatchJob like one can do for a BatchJob?


You should be able to either set the maxConcurrency on the job or call the setMaxConcurrency function on a persisted/running job.

Thanks… I probably haven’t explained well my situation :slight_smile:

I need to set the max concurrency per-note for a JS.BatchJob ( - not a JSBatchJob below my code). If I do c3ShowType( JSBatchJobSpec ) I can’t find the option I need.

var spec = JSBatchJobSpec.make({
allComplete : allComplete.toString(),
doStart : doStart.toString(),
processBatch : processBatch.toString(),
context : {
target : 0

// launch job
var job = JS.batchJob(spec);

@alessandro.perina once you have fired the job and it is running you can do


Get in touch for any doubt

Thanks Marco.
One further question. What happen if I set the max concurrency per node to 1 when my batch job is already executing on 2 nodes?


@alessandro.perina the next tasks dispatched will have the configuration you have set - my suggestion is:

  1. Pause the BatchQueue
  2. Start your Batch
  3. Change the maxConcurrencyPerNode
  4. Resume the Batch Queue