lpknight21 / spring-batch-manager

1 stars 0 forks source link

API - Schedule Job #5

Open lpknight21 opened 8 years ago

lpknight21 commented 8 years ago

This one will be tricky, but hopefully we will be able to easily schedule jobs. We might have build some infrastructure in order to make this happen. I don't know if spring-batch has support for this, I know that Spring has scheduling capabilities but it's not tied to spring-batch.

lpknight21 commented 8 years ago

Quartz is probably the way to go... http://quartz-scheduler.org/documentation/quartz-2.x/tutorials/

<bean id="quartzJobFactory" class="com.edo.prewards.common.job.QuartzSpringBeanJobFactory" />

<bean id="quartzScheduler" class="org.springframework.scheduling.quartz.SchedulerFactoryBean"
      p:jobFactory-ref="quartzJobFactory"
      p:quartzProperties-ref="quartzProperties" />

<bean id="quartzRegistrar" class="com.edo.prewards.common.job.QuartzScheduledJobRegistrar"
      p:scheduler-ref="quartzScheduler" />`