Announcement Announcement Module
Collapse
No announcement yet.
how to restart the Executing jobs Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • how to restart the Executing jobs

    Hi all,
    I have a situation.
    When the Spring batch is running and if due to any reason the process crashes, the currently executing job is exiting in the STATE as EXECUTING and not able to restart that job again.

    Can any one please tell me how can i get through this.
    I have only one parameter in the job and this cannot be changed, the job with same job parameter has to be executed?

  • #2
    Two things:
    1. I'd be interested in seeing the stack trace that is causing the error. The framework should handle thrown exceptions (assuming it can) and mark the execution accordingly.
    2. To restart your job, you'll have to manually mark it as FAILED.

    Comment


    • #3
      Hi mminella,
      Im afraid i can provide any stack trace?.... I suspect there could be any stack trace or error if process is crashed due the server going down...
      Basically the server im running has many other different processes which may cause the whole system crash due high CPU/IO usage by all the processes at the same.

      With respect to Point 2:
      How to manually set the Job to be failed.. jus setting the job in the Spring batch DB is sufficient or any thing else is required to be performed??

      Can u please provide in detail on how to set the job as FAILED?

      Thanks,
      Ravi Shanker .P

      Comment


      • #4
        Updating the database is all you need to do. Be sure to update both the job and any step that my have been in the RUNNING state to FAILED.

        Comment


        • #5
          Hi Micheal,

          As indicated, i tried changing the STATUS and EXIT_CODE of the Executing/Started jobs to FAILED state while the process has crashed.. but still Im getting JobInstance already exists error while restarting the Job.

          Can u please let me know other than the STATUS what else is required for me to update.

          Comment


          • #6
            How are you launching the job?

            Comment


            • #7
              You also need to set the END_TIME of the job execution.

              Comment

              Working...
              X