If you are using tomcat for deploying the admin, then the .war file should have deployed itself into a folder as soon as you start the server once. Now you can trace to the location of the xml files inside that folder, and execute jobs from command-line.
eg: in my case, the xml files are in the folder,
tomcat\webapps\my_project_war\WEB-INF\classes\springbatch
So just in case you want to run a job (say 'abcJob'
) inside an xml, say 'xyz.xml'
,
use the command,
java org.springframework.batch.core.launch.support.CommandLineJobRunner "tomcat\webapps\my_project_war\WEB-INF\classes\springbatch\xyz.xml" "abcJob" parameter1=value1 etc
While running from command-line, you can also set the classpath variable to some constant location, so that you can run all relative jobs with reference to that location. (in my case it is'tomcat\webapps\my_project_war\WEB-INF\classes')
So I would use the command,
java org.springframework.batch.core.launch.support.CommandLineJobRunner "classpath*:springbatch/xyz.xml" "abcJob" parameter1=value1