1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

Update cronExpression in spring applicationContext.xml

Discussion in 'JSP' started by mvairavan, Aug 4, 2007.

  1. mvairavan

    mvairavan New Member

    Joined:
    Aug 2, 2007
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    0
    I am using spring 1.2.7 scheduling service. how to update cronExpression value from DB.


    "<property name="cronExpression" value="0 0 7 * * ?"/>" instead of printing the value (0 0 7 ) statically i want to read it from database. how to apply. Please urgent.



    <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.MethodInvoki ngJobDetailFactoryBean">
    <property name="targetObject" ref="planScheduler"/>
    <property name="targetMethod" value="createPlan"/>
    </bean>

    <bean id="cronTrigger" class="org.springframework.scheduling.quartz.CronTriggerB ean">
    <property name="jobDetail" ref="jobDetail"/>
    <property name="cronExpression" value="0 0 7 * * ?"/>
    </bean>

    <bean class="org.springframework.scheduling.quartz.SchedulerFac toryBean">
    <property name="triggers">
    <list>
    <ref bean="cronTrigger"/>
    </list>
    </property>
    </bean>
     

Share This Page