[Logo] Terracotta Discussion Forums (LEGACY READ-ONLY ARCHIVE)
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Can I inject new jobs into the Quartz JDBCJobStore without clustering enabled?  XML
Forum Index -> Quartz
Author Message

Crosspost from StackOverflow:


I cannot guarantee complete clock synchronization, so instead of using the clustering feature I was thinking to have a single Quartz instance (with a stand-by for fail-over). Having a single instance executing jobs is not a problem, but I still need all of the web servers to be able to schedule jobs.

Can I directly add jobs into the JDBCJobStore from the web servers, and will they be picked up by the (non-clustered) Quartz server? I would be doing this by creating schedule instances in the web servers to add jobs. These instances would never be started, just used to access the JobStore.

Initial experimentation indicates that it seems to work: I wrote a test program that creates a "non-clustered" Quartz scheduler using the same JobStore as the "real" scheduler (also non-clustered), and schedules jobs. After a few seconds, these jobs do get executed.

Does this really work reliably?

Joined: 11/06/2009 15:29:56
Messages: 1703

This should work -- Just be ASOLUTELY sure that you do NOT start() the scheduler instance that is not being used to execute jobs. ( Do not directly write scheduling info to the database, use the scheduler api to insert them).

If you start two more more instances, and "clustered" is not set to true, and/or the clocks are not sync'd, you will get data corruption.

Forum Index -> Quartz
Go to:   
Powered by JForum 2.1.7 © JForum Team