Rollerball
Rollerball

Reputation: 13108

Spring Batch pausing and restarting a job

Is there any way to make a job stop and resume from the same point in Spring Batch? (Dynamically not statically)

Maybe launching a new job that would stop the current one? Has anybody ever done something similar?

Upvotes: 2

Views: 2065

Answers (1)

Artefacto
Artefacto

Reputation: 97805

Should be a matter of calling JobExecution::stop() and then re-run it with the same set of parameters. See this gist.

Upvotes: 3

Related Questions