There is a way to specify a specific task for a specific job, but the only way I found this is to use JobStep.
If you have a "specificJob" task, this will create another queueSpecificJob task, so when it starts through Quartz or Spring Batch web admin it will be queued to execute "specificJob".
<bean id="specificJobLauncher" class="org.springframework.batch.core.launch.support.SimpleJobLauncher"> <property name="jobRepository" ref="jobRepository"/> <property name="taskExecutor"> <task:executor id="singleThreadPoolExecutor" pool-size="1"/> </property> </bean> <job id="queueSpecificJob"> <step id="specificJobStep"> <job ref="specificJob" job-launcher="specificJobLauncher" job-parameters-extractor="parametersExtractor" /> </step> </job>
kmosley
source share