I have two projects, the first one is a maven project developed with Spring framework ( Version 4 ) and it contains the web services Restful which is used to communicate with the front end application ( Developping with Angular 4) and the other one is a spring boot project concerning a batch traitement for scheduling tasks and it has been done by using the spring batch approach.
The idea is to use a web service in the first project who will have the role of running the file Jar generate from the spring-batch project with the possibility to passing a dynamic arguments.
DYNAMIC ARGUMENTS for my project is a CronExpression, this input (argument) should be dynamic.
I already used the RunTime.exec( "java", "-jar", "MyFile.jar", "Arg1" ) but it doesn't work. So after a search I found I nother way by using proccessBuilder and it work fine but just for a static argument.
My goal is to run my jar for once and to be all the time on running and at the same time i should pass a dynamic arguments to run my batch traitement.
I would like to suggest me the best way to do it.
Thank you !