• Post Reply Bookmark Topic Watch Topic
  • New Topic

Reschedule quartz trigger  RSS feed

 
arushi tomar
Ranch Hand
Posts: 91
3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to learn quartz. I have main method



Which works fine. It prints to the console on 3rd day of the week at 12:38 pm.
Now, what I want to do is to reschedule the trigger, so that it deletes the previous stored trigger and creates a new trigger with new schedule.

I read a lot of things at a lot of places but I just can't seem to understand clearly what I actually have to do, for ex:



and also this:

// Define a new Trigger

// tell the scheduler to remove the old trigger with the given key, and
// put the new one in its place


but I can't understand the approach(I do understand what is happening in the code though). Thanks in advance.
 
Anayonkar Shivalkar
Bartender
Posts: 1558
5
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi arushi,

Though I'm not much aware of quartz (looks like a job scheduler) - I think this question is more quartz specific than Java specific.

Did you try to get in touch with somebody who knows quartz?
 
arushi tomar
Ranch Hand
Posts: 91
3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anayonkar Shivalkar wrote:Hi arushi

Yes it is, but I could not find Quartz forum here. And I don't know people who know quartz so I'm stuck all by myself.
 
Anayonkar Shivalkar
Bartender
Posts: 1558
5
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes that is why I couldn't move your post to proper forum

Anyways I just checked API documentation (please note that I have zero knowledge in quartz internals) and found that rescheduleJob(<-click) needs a new trigger with same job name and group name.

I can see that your new trigger does not contain job name. Maybe you can try forJob(<-click).

I hope this helps.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!