Announcement Announcement Module
Collapse
No announcement yet.
Restart job with step execution status = Started Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Restart job with step execution status = Started

    Is there a way to restart a job, when job fails and the step execution status is "Started"....?

    To restart a job, we need to provide the same job parameters as the failed job. But when I try to restart a job, it gives me error - "org.springframework.batch.core.repository.JobExec utionAlreadyRunningException: A job execution for this job is already running".

    Lets say, my batch job is running and database goes down. So in this case, job & step status has not been updated by Spring Batch.

    Now database is up and I want to run the same job and restart it from the point it failed.

    How do I achieve this ..???

    Appreciate help/input on this.

  • #2
    You'll need to manually mark the job as FAILED to restart the job.

    Comment


    • #3
      Thanks for the reply.

      That's what I thought. There is no way for framework to know that job didn't complete.

      Comment


      • #4
        When you restart the job, there is no way for the framework to know that the job actually died in some way vs is running on another server.

        Comment

        Working...
        X