I am using a spring batch tasklet for batch processing and my scenario is to do the below process once in a day at say 11 PM in the night. The process are
Read a file and process
write the data to the DB
archive the file.
But when I execute the job, the job keeps on executing the first step in multiple threads and iam getting this error Could not execute the job succesfullyorg.springframework.batch.core.repository.JobExecutionAlreadyRunningException:
Is there any wat that I can configure in my job xml to execute the job only once for the schedule time.
<batch:job id="PullJob">
<batch:step id="ProcessingStep" next="cleanStep">
<batch:tasklet transaction-manager="transactionManager">
<batch:chunk reader="fileReader" processor="processor" writer="dbWriter" commit-interval="30" />
</batch:tasklet>
</batch:step>
<batch:step id="cleanStep">
<tasklet ref="cleaningTasklet"/>
</batch:step>
</batch:job>