Author |
Message |
11/24/2009 03:29:58
|
Anonymous
|
Hi all,
I am working on an application, where we require a job schedular.
Requirement is , that the job schedular works alone, fetchs jobs from a database and execute them.
Is this possible with Quartz?
Any pointers in this direction will be helpful.
Thanks.
|
|
|
11/24/2009 07:04:33
|
jhouse
seraphim
Joined: 11/06/2009 15:29:56
Messages: 1703
Offline
|
Quartz ships with a QuartzServer class, that fires up Quartz as a standalone application. You can configure it (with quartz.properties) to point to a database where the jobs are stored. The jobs can be inserted into that database by another process by:
1- using the rmi features of quartz from another process, and using the quartz API
2- instantiating a scheduler within another process (e.g. webapp), also pointing it to the same database, but NOT start()ing that scheduler instace, and the using the quartz api to schedule jobs.
|
|
|
11/24/2009 17:36:29
|
Anonymous
|
Excellent.
Would be good to mention this scenario in the official documentation, as I think it is quite common.
Also, for using a non-started Scheduler to inject jobs into the database, maybe there should be a new Scheduler implementation for that, one that cannot be accidentally started (and one that does not create a thread pool that is never used) and that does not need to be shutdown. Maybe it is worth to break up the Scheduler interface into the Scheduler part and the Executor part.
|
|
|
11/25/2009 07:18:49
|
jhouse
seraphim
Joined: 11/06/2009 15:29:56
Messages: 1703
Offline
|
Thanks! Those API suggestions are actually already on the "2.0" roadmap.
|
|
|
|