Quartz runtime job scheduling
I need to schedule jobs within Quartz at runtime based on user entered scheduling detail (I build the cron trigger for use within Quartz). I have wired the SchedulerFactoryBean as:
Quote:
<bean id="scheduleFactory" class="org.springframework.scheduling.quartz.Sched ulerFactoryBean">
<property name="autoStartup"><value>true</value></property>
</bean>
From the API guide, it is suggested that I wire the scheduleFactory to the object that will be manipulating the scheduler... so for example, I wired the scheduleFactory to a controller class so this controller can add the user-defined job and schedule to Quartz. From this class (the controller) I need to add a schedule to Quartz but the scheduleFactory does not expose the Scheduler object from Quartz.
Within Quartz you would do something like:
Quote:
Scheduler sched = scheduleFactory.getScheduler();
and then work with the sched instance and schedule the job within Quartz like:
Quote:
sched.scheduleJob(jobDetail, cronTrigger);
How can I do the same thing with Spring integration, meaning I would like Spring to manage the ScheduleFactory and all my app code needs to do is feed it schedules (jobDetails and cronTriggers).
Thanks in advance for your help.