Have you checked out the Spring Batch documentation. Yes, I know a RTM post. But actually the Spring Batch documentation is the best documentation I have found for all of Spring modules. It is really an easy read and explains everything.
You can choose to run in a container or not, it runs anywhere, just like anything from Spring. Well, except Spring MVC requires something with a web container, ;)
In case a job has already executed successfully OR is already running, Spring throws an exception. From the names of the readers & writers it seems like they are running in an infinite loop. So when Spring tries to launch a new instance the previous one is already running, so it throws an exception.
In your case even if the previous job had finished running the next one will still fail as you are passing same job parameters. For each job instance you need to pass different job parameters. In case you don't have any parameters for the job you can use the JobParametersIncrementer to create uniqueness.
For scheduling the task every hour you can use the task namespace provided by Spring. You can write a bean to start a job & scheduler to trigger/invoke method of the bean.
posted 7 years ago
Thanks Rishi, I was able to get the scheduling to work
What you said makes sense, the job might be still running but what surprises me is that log messages placed in both files ain't displayed so it seems like they are never called. Need to try harder to figure this out.
Here goes the InfiniteLoopWriter and InfiniteLoopReader from the Spring samples just in case.