Results 1 to 2 of 2

Thread: Regarding timer

Hybrid View

  1. #1
    Join Date
    Nov 2005
    Posts
    148

    Question Regarding timer

    Hi,
    i want to schedule 3 task.

    1. this task will start daily at 1:00 am
    2. this task will start at 1:00 am on every monday.
    3. this task will start at 1:00 am on 1st of every month.

    Can anyone help me in this regard?


    Regards,
    shahzad

  2. #2
    Join Date
    Nov 2005
    Posts
    148

    Default solved

    Hi,

    i have done with the following:


    <bean id="dailyJobDetail" class="org.springframework.scheduling.quartz.Metho dInvokingJobDetailFactoryBean">
    <property name="targetObject" ref="dailyMailSender"/>
    <property name="targetMethod" value="doIt"/>
    </bean>


    #########################################3

    <bean id="dailyCronTrigger" class="org.springframework.scheduling.quartz.CronT riggerBean">
    <property name="jobDetail" ref="dailyJobDetail"/>
    <!-- run every morning at 01:15 AM -->
    <property name="cronExpression" value="0 15 01 ? * *"/>
    </bean>



    ###################################


    <bean class="org.springframework.scheduling.quartz.Sched ulerFactoryBean">
    <property name="triggers">
    <list>
    <ref bean="dailyCronTrigger"/>
    </list>
    </property>
    </bean>


    #########################################

    i also implemented monthly and weekly with same code.

    Can anyone tell me, Is this the right way to do?

    Regards,

    Shahzad

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •