1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Update cronExpression from DB

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

  1. mvairavan

    mvairavan New Member

    Joined:
    Aug 2, 2007
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    0
    In the below coding
    Code:
      "<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.MethodInvokingJobDetailFactoryBean">
            <property name="targetObject" ref="planScheduler"/>
            <property name="targetMethod" value="createPlan"/>
        </bean>
    
        <bean id="cronTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean">
            <property name="jobDetail" ref="jobDetail"/>
            <property name="cronExpression" value="0 0 7 * * ?"/>
        </bean>
        
        <bean class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
            <property name="triggers">
                <list>
                    <ref bean="cronTrigger"/>
                </list>
            </property>
        </bean>
     
    Last edited by a moderator: Aug 2, 2007
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,293
    Likes Received:
    365
    Trophy Points:
    83
    You probably missed to complete the complete query.

    Also moved from Java to JSP forum for better responses.
     

Share This Page