Skip to content

batch job using param incrementer can’t be restarted anymore from command line #5340

@christophejan

Description

@christophejan

Supersedes spring-projects/spring-boot/issues/49569 (please check spring-boot team feedback on it)

With Spring Boot 4.0.3, batches using JobParameterIncrementer can’t be restarted anymore from the command line. Instead of restarting the job instance, İt starts a new instance of the job.

Without JobParameterIncrementer, there is no such issue with restart.

Spring Batch 6 doesn’t forbid to restart a job with JobParameterIncrementer. Such a job can still be restarted as expected when using JobOperator#restart (but not with JobOperator#start()).

JobOperator seems a little inconsistent to me with Spring Batch 6 major changes around JobParameterIncrementer. I don’t know if this restart issue should be fixed on Spring Boot JobLaunchApplicationRunner or on Spring Batch side.

Here is a demo.zip to illustrate the issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: waiting-for-reporterIssues for which we are waiting for feedback from the reporter

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions