• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Quartz Sceduler

 
Jyoti Aggarwal
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I need to create a scheduler that has to do around around 100 jobs at different time. What is the best way to got about this.
I am able to run 2-3 jobs at different time using different jobdetail group.


But there are like 100 job and and using different job group is not feasible. Please suggest.

And thing is, is there any way in Quartz where if the server is stopped for any reason ifor some time, so the jobs that has been scheduled during that period of time can be refired as soon as server is restarted?

Please answer soon its very urgent.
 
James Ward
Ranch Hand
Posts: 263
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So, why have different groups, why not place all jobs in same group?
Only Job name within a group should be unique.
 
Jyoti Aggarwal
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As it is throwing the following error :
Scheduler not Initialised org.quartz.ObjectAlreadyExistsException: Unable to store Trigger with name: 'JobTrigger' and group: 'Job1', because one already exists with this identification.

Besides Cannot use map either as every jod has to be triggered at different time.
 
James Ward
Ranch Hand
Posts: 263
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JobName needs to be unique, not JobGroup.

This should work:

is there any way in Quartz where if the server is stopped for any reason ifor some time, so the jobs that has been scheduled during that period of time can be refired as soon as server is restarted?


See this attribute of Trigger Class: MISFIRE_INSTRUCTION_SMART_POLICY, in the API documentation - http://quartz.sourceforge.net/javadoc/index.html. This deals with handling such cases.
 
Jyoti Aggarwal
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have just tried it and it is giving same error. and besides how to used "MISFIRE_INSTRUCTION_SMART_POLICY"
 
Sagar Rohankar
Ranch Hand
Posts: 2906
1
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could you try something like this:
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic