Announcement Announcement Module
Collapse
No announcement yet.
Quartz Scheduler Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Quartz Scheduler

    I have two jobs running and am experiencing some problems using the Quartz scheduler. Everytime a job runs, it executes twice.. . This is very bizarre, has anyone experienced this?

    thanks!
    rajiv

  • #2
    There have been sporadic claims of such behavior, but it has always been due to configuration issue, from what I've seen. Can you post the section of your Spring config that shows your triggers, jobs, and scheduler configuration?

    Comment


    • #3
      Yeah. I'm pretty new to spring so I'm sure there is a mistake somehwere. Here is what I have. Any help would be greatly appreciated!

      <bean id="documentIndexer" class="test.service.IndexService">
      <property name="docManager" ref="documentManagerProxy" />
      </bean>

      <bean id="documentIndexerJobDetail" class="org.springframework.scheduling.quartz.Metho dInvokingJobDetailFactoryBean">
      <property name="targetObject" ref="documentIndexer" />
      <property name="targetMethod" value="indexDocuments" />
      <property name="concurrent" value="false" />
      </bean>

      <bean id="documentIndexerJobTrigger" class="org.springframework.scheduling.quartz.CronT riggerBean">
      <property name="jobDetail" ref="documentIndexerJobDetail" />
      <property name="cronExpression" value="0 0/10 * * * ?" />
      </bean>

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

      Comment


      • #4
        I had similar issue, every time the trigger fired 10 times. there is no special way to handle this, I just re-copy a cronexpression from somewhere and replace the old one, then edit it, then it works fine.

        This solution looks stupid and make no sense, but it works for me.

        if it is not working, let me know.

        Thanks

        Comment


        • #5
          I fixed it! it was a misconfiguration in my tomcat server.xml.

          thanks again,
          rajiv

          Comment

          Working...
          X