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.
I put this in "Other Application Frameworks". It may not be the best forum for it, but it fits. Quartz is a framework for doing scheduled operations, much like the Unix "cron" service does.
I haven't worked with Quartz lately, but I believe it supports both one-shot tasks and regularly repeated tasks. You can keep the task schedule in persistent storage or just in-memory.
There's also a Spring Scheduling module and it supports Quartz.
I think the question was in how to get work done at a regularly-scheduled interval, and yes, Quartz is very much about that. You don't have to manually re-schedule repeated tasks, just set up the time/day(s) that it should do the task and Quartz will handle dispatching that task automatically.
Sources may include data from the Fakebook Research Foundation with support from Gargle University
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop