spring - How to repeat a cronExpression in a specific period of time? -


greetings have cronexpression want started on application startup , repeated every second, defining cronexpression via xml configuration follows:

<bean id="mycrontrigger1" class="org.springframework.scheduling.quartz.crontriggerbean">         <property name="jobdetail" ref="myjob" />          <property name="cronexpression" >         <value>${first.trigger.time}</value>          </property>       </bean> 

any please ?

you can use simpletrigger more suited usage.

from simpletrigger lesson:

simpletrigger should meet scheduling needs if need have job execute once @ specific moment in time, or @ specific moment in time followed repeats @ specific interval.

<bean id="simpletrigger" class="org.springframework.scheduling.quartz.simpletriggerbean">     <property name="jobdetail" ref="jobdetailbean" />     <property name="repeatinterval" value="1000" /> </bean> 

Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -