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

  • Scheduling two Quartz jobs

    Hi,

    I would like to schedule two jobs in my spring based application. The scheduling should can be paused and started again. The Quartz Scheduler class has the corresponding methods: standby() and start(). I have tried to declare two different SchedulerFactoryBeans with singleton=”false”, but if I try to get a reference to either of them with Scheduler scheduler1 = applicationContext(“scheduler1”) I get a reference to scheduler2. Can I have two different SchedulerFactoryBeans in an application? And if not, how can I schedule two different jobs?

    Thanks,

    Igor

  • #2
    I don't understand why you can't just schedule two jobs? Why would you need two schedulers? If you want to do in the XML just create two triggers and two jobs. If you are using Quartz you can just do the same programmatically.
    http://www.springframework.org/docs/...ng-quartz-cron

    Comment

    Working...
    X