Interface IDailyTimeIntervalTrigger
- Namespace
- Quartz
- Assembly
- Quartz.dll
A ITrigger that is used to fire a IJobDetail based upon daily repeating time intervals.
public interface IDailyTimeIntervalTrigger : ITrigger
- Inherited Members
Remarks
The trigger will fire every N (see RepeatInterval ) seconds, minutes or hours (see RepeatIntervalUnit) during a given time window on specified days of the week.
For example#1, a trigger can be set to fire every 72 minutes between 8:00 and 11:00 everyday. It's fire times be 8:00, 9:12, 10:24, then next day would repeat: 8:00, 9:12, 10:24 again.
For example#2, a trigger can be set to fire every 23 minutes between 9:20 and 16:47 Monday through Friday.
On each day, the starting fire time is reset to startTimeOfDay value, and then it will add repeatInterval value to it until the endTimeOfDay is reached. If you set daysOfWeek values, then fire time will only occur during those week days period.
The default values for fields if not set are: startTimeOfDay defaults to 00:00:00, the endTimeOfDay default to 23:59:59, and daysOfWeek is default to every day. The startTime default to current time-stamp now, while endTime has not value.
If startTime is before startTimeOfDay, then it has no affect. Else if startTime after startTimeOfDay, then the first fire time for that day will be normal startTimeOfDay incremental values after startTime value. Same reversal logic is applied to endTime with endTimeOfDay.
The trigger's StartTimeUtc and EndTimeUtc are rounded down to the whole second when they are set, because the fire times are computed as a whole number of intervals from the start of the day. A start time carrying milliseconds would otherwise be able to produce a first fire time before itself.
This is a read model: to change a trigger's schedule, rebuild it with GetTriggerBuilder() and hand it to RescheduleJob(TriggerKey, ITrigger, CancellationToken).
Properties
DaysOfWeek
The days of the week upon which to fire.
IReadOnlyCollection<DayOfWeek> DaysOfWeek { get; }
Property Value
- IReadOnlyCollection<DayOfWeek>
A Set containing the integers representing the days of the week, per the values 0-6 as defined by DayOfWees.Sunday - DayOfWeek.Saturday.
EndTimeOfDay
The time of day to complete firing at the given interval. Defaults to 23:59:59.
TimeOnly EndTimeOfDay { get; }
Property Value
Remarks
The value is kept with one-second resolution, which is what the job store persists.
MisfireInstruction
What the scheduler does when this trigger misses a firing.
DailyTimeIntervalTriggerMisfireInstruction MisfireInstruction { get; }
Property Value
- See Also
RepeatCount
Get the number of times per day this trigger should repeat. Setting to 0 means fire once per day; setting to N means fire N+1 times per day.
int RepeatCount { get; }
Property Value
RepeatInterval
Get the time interval that will be added to the IDailyTimeIntervalTrigger's fire time (in the set repeat interval unit) in order to calculate the time of the next trigger repeat.
int RepeatInterval { get; }
Property Value
RepeatIntervalUnit
Get the interval unit - the time unit on with the interval applies. The only intervals that are valid for this type of trigger are Second, Minute, and Hour
IntervalUnit RepeatIntervalUnit { get; }
Property Value
StartTimeOfDay
The time of day to start firing at the given interval. Defaults to 00:00:00.
TimeOnly StartTimeOfDay { get; }
Property Value
Remarks
The value is kept with one-second resolution, which is what the job store persists.
TimeZone
Gets the time zone within which time calculations related to this trigger will be performed.
TimeZoneInfo TimeZone { get; }
Property Value
Remarks
If null, the system default TimeZone will be used.
TimesTriggered
Get the number of times the IDailyTimeIntervalTrigger has already fired.
int TimesTriggered { get; }