I am having a spring batch application, that is invoked through the command line. I would want to put that invocation in a shell script, so that I can run a script rather than the entire command.
For example, my invocation looks like:
java -jar run=1
The problem is for each run, the job parameter needs to be incremented. Is there a way through which i can achieve that in a shell script?
Thanks
You need an incrementer for this as usual.
The trick for this incrementer to work with CommandLineJobRunner is adding the -next parameter when running the task.
Something like this: