public override void UpdateAfterMisfire(ICalendar cal)
{
int instr = MisfireInstruction;
if (instr == Quartz.MisfireInstruction.IgnoreMisfirePolicy)
{
return;
}
if (instr == Quartz.MisfireInstruction.SmartPolicy)
{
instr = Quartz.MisfireInstruction.DailyTimeIntervalTrigger.FireOnceNow;
}
if (instr == Quartz.MisfireInstruction.DailyTimeIntervalTrigger.DoNothing)
{
DateTimeOffset? newFireTime = GetFireTimeAfter(SystemTime.UtcNow());
while (newFireTime != null && cal != null && !cal.IsTimeIncluded(newFireTime.Value))
{
newFireTime = GetFireTimeAfter(newFireTime);
}
SetNextFireTimeUtc(newFireTime);
}
else if (instr == Quartz.MisfireInstruction.CalendarIntervalTrigger.FireOnceNow)
{
// fire once now...
SetNextFireTimeUtc(SystemTime.UtcNow());
// the new fire time afterward will magically preserve the original
// time of day for firing for day/week/month interval triggers,
// because of the way getFireTimeAfter() works - in its always restarting
// computation from the start time.
}
}