This week's book giveaway is in the Reactive Progamming forum.
We're giving away four copies of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams and have Adam Davis on-line!
See this thread for details.
Win a copy of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams this week in the Reactive Progamming forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

Quartz Scheduler

 
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.
 
Ranch Hand
Posts: 2908
1
Spring Java 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 ?
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • 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: 2908
1
Spring Java 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

 
Paper beats rock. Scissors beats tiny ad.
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!