Reputation: 358
How can I get the existing schedules from quartz.net and edit one of the triggers firing time? Please advice. I am new to quartz.net and there is nothing exmplained about this in Quartz.net documentation.
Upvotes: 0
Views: 1438
Reputation: 13794
you can try something like this
var allTriggerKeys = sched.GetTriggerKeys(GroupMatcher<TriggerKey>.AnyGroup());
foreach (var triggerKey in allTriggerKeys)
{
ITrigger trigger = sched.GetTrigger(triggerKey);
if(trigger.JobName=="yourtriggername", trigger.JobGroup=="yourjobgroupname")
{
scheduler.RescheduleJob(trigger.JobName, trigger.JobGroup, trigger);
}
}
Upvotes: 2