• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Quartz Scheduler

 
Sonam Zam
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have set my quartz.properties with following configurations.

But the jobs are not scheduled in the same order as I have specified the files.
i.e sometimes jobs2.xml is read before reading job1.xml.

Then whats the significance of the property 'overWriteExistingJobs' ?

If i want that the jobs in job1.xml to get overwritten if job2.xml has the same entry.
In other words, how can I enforce that file2 should always have higher precedence than file1? And if file2 contains same job as file1 then the jobs from file2 should overwrite file1 jobs.

please suggest.
thanks.
 
Sagar Rohankar
Ranch Hand
Posts: 2907
1
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sonam Zam wrote:Then whats the significance of the property 'overWriteExistingJobs' ?

I think, 'overWriteExistingJobs' property will overwrite the currently running "same" job.

Sonam Zam wrote:If i want that the jobs in job1.xml to get overwritten if job2.xml has the same entry.

Two Jobs are same when they share the same "group" and same "name". So if job1.xml and job2.xml contains the same name and group then they get overwritten.

Sonam Zam wrote:In other words, how can I enforce that file2 should always have higher precedence than file1? And if file2 contains same job as file1 then the jobs from file2 should overwrite file1 jobs.

Search the JavaDocs, for that information. BTW, why do you want to create the same job in 2 different file ?
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Looking at Quartz sources, it looks like the jobs are stored in a HashMap. The values of the map are iterated using Map#values().iterator(), which is probably why the initialization order is undefined. Now, the problem is to know what the overWriteExistingJobs's real purpose is...
 
Sagar Rohankar
Ranch Hand
Posts: 2907
1
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Christophe Verré wrote:Looking at Quartz sources, it looks like the jobs are stored in a HashMap. The values of the map are iterated using Map#values().iterator(), which is probably why the initialization order is undefined.

That means if someone really want an ORDER of execution, then try defining a separate class and not this PlugIn thing.
Christophe Verré wrote:Now, the problem is to know what the overWriteExistingJobs's real purpose is...

That question leads me to Google, and I found this link from the creator itself:
http://www.opensymphony.com/quartz/wikidocs/JobInitPlugin.html

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic