-
Oct 4th, 2007, 12:04 AM
#1
How to update cronExpression value at the time of dynamic?
Hi,
I am using spring cron expression in my project applicationContext.xml. cronExpression value give the static. but how to update cronExpression value by passing a value from DB.
My Code attached here:
<bean id="planScheduler" class="com.nss.easyplan.service.PlanScheduler">
<property name="planManager" ref="planManager"/>
<property name="adminSettingManager" ref="settingManager"/>
</bean>
<bean id="jobDetail" class="org.springframework.scheduling.quartz.Metho dInvokingJobDetailFactoryBean">
<property name="targetObject" ref="planScheduler"/>
<property name="targetMethod" value="createPlan"/>
</bean>
<bean id="cronTrigger" class="org.springframework.scheduling.quartz.CronT riggerBean">
<property name="jobDetail" ref="jobDetail"/>
<property name="cronExpression" value="0 0 13 * * ?"/>
</bean>
<bean class="org.springframework.scheduling.quartz.Sched ulerFactoryBean">
<property name="triggers">
<list>
<ref bean="cronTrigger"/>
</list>
</property>
</bean>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules