org.quartz
Interface DailyTimeIntervalTrigger

All Superinterfaces:
Cloneable, Comparable<Trigger>, Serializable, Trigger
All Known Implementing Classes:
DailyTimeIntervalTriggerImpl

public interface DailyTimeIntervalTrigger
extends Trigger

A Trigger that is used to fire a JobDetail based upon daily repeating time intervals.

The trigger will fire every N (see #setRepeatInterval(int) ) seconds, minutes or hours (see #setRepeatIntervalUnit(IntervalUnit)) 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 would 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.

Since:
2.1.0
Author:
James House, Zemian Deng
See Also:
DailyTimeIntervalTriggerImpl, DailyTimeIntervalScheduleBuilder

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.quartz.Trigger
Trigger.CompletedExecutionInstruction, Trigger.TriggerState, Trigger.TriggerTimeComparator
 
Field Summary
static int MISFIRE_INSTRUCTION_DO_NOTHING
           Instructs the Scheduler that upon a mis-fire situation, the DailyIntervaledTimeRangeTrigger wants to have it's next-fire-time updated to the next time in the schedule after the current time (taking into account any associated Calendar, but it does not want to be fired now.
static int MISFIRE_INSTRUCTION_FIRE_ONCE_NOW
           Instructs the Scheduler that upon a mis-fire situation, the DailyIntervaledTimeRangeTrigger wants to be fired now by Scheduler.
static int REPEAT_INDEFINITELY
           Used to indicate the 'repeat count' of the trigger is indefinite.
 
Fields inherited from interface org.quartz.Trigger
DEFAULT_PRIORITY, MISFIRE_INSTRUCTION_IGNORE_MISFIRE_POLICY, MISFIRE_INSTRUCTION_SMART_POLICY, serialVersionUID
 
Method Summary
 Set<Integer> getDaysOfWeek()
          The days of the week upon which to fire.
 TimeOfDay getEndTimeOfDay()
          The time of day to complete firing at the given interval.
 int getRepeatCount()
           Get the the number of times for interval this trigger should repeat, after which it will be automatically deleted.
 int getRepeatInterval()
           Get the the time interval that will be added to the DateIntervalTrigger's fire time (in the set repeat interval unit) in order to calculate the time of the next trigger repeat.
 DateBuilder.IntervalUnit getRepeatIntervalUnit()
          Get the interval unit - the time unit on with the interval applies.
 TimeOfDay getStartTimeOfDay()
          The time of day to start firing at the given interval.
 int getTimesTriggered()
           Get the number of times the DateIntervalTrigger has already fired.
 TriggerBuilder<DailyTimeIntervalTrigger> getTriggerBuilder()
          Get a TriggerBuilder that is configured to produce a Trigger identical to this one.
 
Methods inherited from interface org.quartz.Trigger
compareTo, equals, getCalendarName, getDescription, getEndTime, getFinalFireTime, getFireTimeAfter, getJobDataMap, getJobKey, getKey, getMisfireInstruction, getNextFireTime, getPreviousFireTime, getPriority, getScheduleBuilder, getStartTime, mayFireAgain
 

Field Detail

REPEAT_INDEFINITELY

static final int REPEAT_INDEFINITELY

Used to indicate the 'repeat count' of the trigger is indefinite. Or in other words, the trigger should repeat continually until the trigger's ending timestamp.

See Also:
Constant Field Values

MISFIRE_INSTRUCTION_FIRE_ONCE_NOW

static final int MISFIRE_INSTRUCTION_FIRE_ONCE_NOW

Instructs the Scheduler that upon a mis-fire situation, the DailyIntervaledTimeRangeTrigger wants to be fired now by Scheduler.

See Also:
Constant Field Values

MISFIRE_INSTRUCTION_DO_NOTHING

static final int MISFIRE_INSTRUCTION_DO_NOTHING

Instructs the Scheduler that upon a mis-fire situation, the DailyIntervaledTimeRangeTrigger wants to have it's next-fire-time updated to the next time in the schedule after the current time (taking into account any associated Calendar, but it does not want to be fired now.

See Also:
Constant Field Values
Method Detail

getRepeatIntervalUnit

DateBuilder.IntervalUnit getRepeatIntervalUnit()

Get the interval unit - the time unit on with the interval applies.

The only intervals that are valid for this type of trigger are DateBuilder.IntervalUnit.SECOND, DateBuilder.IntervalUnit.MINUTE, and DateBuilder.IntervalUnit.HOUR.


getRepeatCount

int getRepeatCount()

Get the the number of times for interval this trigger should repeat, after which it will be automatically deleted.

See Also:
REPEAT_INDEFINITELY

getRepeatInterval

int getRepeatInterval()

Get the the time interval that will be added to the DateIntervalTrigger's fire time (in the set repeat interval unit) in order to calculate the time of the next trigger repeat.


getStartTimeOfDay

TimeOfDay getStartTimeOfDay()
The time of day to start firing at the given interval.


getEndTimeOfDay

TimeOfDay getEndTimeOfDay()
The time of day to complete firing at the given interval.


getDaysOfWeek

Set<Integer> getDaysOfWeek()
The days of the week upon which to fire.

Returns:
a Set containing the integers representing the days of the week, per the values 1-7 as defined by Calendar.SUNDAY - Calendar.SATURDAY.

getTimesTriggered

int getTimesTriggered()

Get the number of times the DateIntervalTrigger has already fired.


getTriggerBuilder

TriggerBuilder<DailyTimeIntervalTrigger> getTriggerBuilder()
Description copied from interface: Trigger
Get a TriggerBuilder that is configured to produce a Trigger identical to this one.

Specified by:
getTriggerBuilder in interface Trigger
See Also:
Trigger.getScheduleBuilder()


Copyright 2001-2013, Terracotta, Inc.