-
Oct 5th, 2012, 10:36 AM
#1
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?
-
Oct 5th, 2012, 02:38 PM
#2
Two things:
- 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.
- To restart your job, you'll have to manually mark it as FAILED.
-
Oct 7th, 2012, 02:56 AM
#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
-
Oct 10th, 2012, 09:14 AM
#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.
-
Oct 13th, 2012, 12:08 AM
#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.
-
Oct 22nd, 2012, 04:49 PM
#6
How are you launching the job?
-
Oct 23rd, 2012, 11:37 AM
#7
You also need to set the END_TIME of the job execution.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules