May 2015
Intermediate to advanced
234 pages
4h 18m
English
A simple and robust way to execute a job is to use the command-line interface. This allows you to use a standard cron job (use the AT command on Windows) to schedule it, so that the job will be executed even if the web application is down. It's also convenient for testing and debugging a job.
We'll use the job defined in the Creating a job recipe.
Follow these steps to execute the job from the command line:
maven-assembly-plugin in pom.xml (under build/plugins):<plugin> <artifactId>maven-assembly-plugin</artifactId> <configuration> <archive> <manifest> <mainClass> org.springframework.batch.core.launch.support. CommandLineJobRunner </mainClass> </manifest> </archive> <descriptorRefs> ...
Read now
Unlock full access