Spring+Quartz Fire job execution only if previous has finished -


i'm using springmvc (4.x) along quartz (2.x). i'm setting bean defnition file fire simple job, wnat make sure job fired if previous execution of job has finished. there parameter can inform simpletriggerfactorybean in order avoid concurrent execution?

by using repeatinterval property, won't fire simultaneous jobs?

my quartz bean definition xml

<bean id="autopusherjob" class="org.springframework.scheduling.quartz.jobdetailfactorybean">     <property name="jobclass" value="br.teste.automessagepusherjob" />     <property name="jobdataasmap">         <map>             <entry key="username" value="systemcronjob"/>             <entry key="message">                 <bean class ="br.teste.model.message"/>             </entry>                     </map>     </property>     <property name="durability" value="true" /> </bean>  <bean id="simpletrigger"  class="org.springframework.scheduling.quartz.simpletriggerfactorybean">     <property name="jobdetail" ref="autopusherjob" />     <property name="startdelay" value="1000" />     <property name="repeatinterval" value="1000" /> </bean>   <bean  class="org.springframework.scheduling.quartz.schedulerfactorybean">     <property name="jobdetails">         <list>             <ref bean="autopusherjob" />         </list>     </property>      <property name="triggers">         <list>             <ref bean="simpletrigger" />         </list>     </property> </bean> 

your job class needs annotated disallowconcurrentexecution annotation.


Comments

Popular posts from this blog

java - Spring Data JPA: Why findOne(id) executing delete query internally? -

python - Mongodb How to add addtional information when aggregating? -

java - Incorrect order of records in M-M relationship in hibernate -