Results 1 to 5 of 5

Thread: how to set the jobs to be run in sequential or parallel

  1. #1
    Join Date
    Sep 2012
    Posts
    16

    Default how to set the jobs to be run in sequential or parallel

    Is there any configuration in the Spring batch that allows the Jobs assigned to the spring batch to run either in parallel or in sequential as per the input value?

  2. #2
    Join Date
    Sep 2008
    Location
    Chicagoland, IL
    Posts
    351

    Default

    This is a tricky question. While, technically, you can create a batch job that launches sub jobs and they can be in parallel, typically the orchestration of job execution (what jobs are run with what parameters and when) is handled externally to the job (a scheduler, script, etc).

    What is the specific use case you are looking to satisfy?
    Michael Minella
    Spring Batch Lead
    Author - Pro Spring Batch
    http://www.michaelminella.com
    Twitter: @MichaelMinella

  3. #3
    Join Date
    Sep 2012
    Posts
    16

    Default

    use case is as such..
    I need to maintain a sequence in the job processing..
    at at times i have to execute two jobs that can be executed parallel... here the data for both the jobs is different..
    where as few times i have to execute two jobs in a sequential way here the data to use by both jobs is same.

  4. #4
    Join Date
    Sep 2008
    Location
    Chicagoland, IL
    Posts
    351

    Default

    I'd recommend this type of orchestration be done outside of the batch jobs themselves and use parameters to the jobs to indicate what data to use.
    Michael Minella
    Spring Batch Lead
    Author - Pro Spring Batch
    http://www.michaelminella.com
    Twitter: @MichaelMinella

  5. #5
    Join Date
    Sep 2012
    Posts
    16

    Default

    Ok Thanks,

    Hope there would be support for this requirement in future releases of Spring Batch.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •