Spring batch :Restart a job and then start next job automatically

前端 未结 3 490
时光说笑
时光说笑 2020-12-21 01:12

I need to create a recovery pattern. In my pattern I can launch a job only on a given time window. In case the job fails, it will only be restarted on the next time window a

3条回答
  •  误落风尘
    2020-12-21 01:47

    have you considered a JobStep? that is, a step determines if there are any additional jobs to be run. this value is set into the StepExecutionContext. a JobExecutionDecider then checks for this value; if exists, directs to a JobStep which launches the Job.

    here's the doc on it http://docs.spring.io/spring-batch/reference/htmlsingle/#external-flows

提交回复
热议问题