Announcement Announcement Module
Collapse
No announcement yet.
Spring 3.1 + Quartz 2.1 - Cron Schedular is not triggering Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring 3.1 + Quartz 2.1 - Cron Schedular is not triggering

    Hi All,
    I am trying to configure the CronTriggerFactoryBean to scheduling a job,But for some reason its not firing.Any help would be really appreciated.

    So here is my spring bean configuration.

    <bean class="org.springframework.scheduling.quartz.CronT riggerFactoryBean"
    p:cronExpression="0 0/1 * * * ?"
    p:jobDetail-ref="jobDetail"/>

    <bean id="jobDetail" class="org.springframework.scheduling.quartz.Metho dInvokingJobDetailFactoryBean"
    p:targetObject-ref="job"
    p:targetMethod="flushToDB"
    p:concurrent="false"/>

    <bean id="job" class="com.sample.Job"/>
    Let me know if i am making any silly mistake.

    Thanks
    SAN

  • #2
    I have the same issue.

    Thanks.
    Best regards.

    Comment


    • #3
      If you are using Spring 3.1, you can actually do it via Annotation.

      This is how I did it:
      PHP Code:
      // Annotated as Service
      @Service
      public class OverNightGenerator {
         ...
         
      // Here you can set the schedular 
         
      @Scheduled(cron="0 40 7 * * *")        // every day at 7.40 am
         
      public void doSomethingEveryMorning() {
            
      // will be execute every morning
         
      }

      It works for me.

      Comment


      • #4
        Thanks man.

        It works for me now

        Comment

        Working...
        X