Interface SimpleTrigger
- All Superinterfaces:
Cloneable
,Comparable<Trigger>
,Serializable
,Trigger
- All Known Implementing Classes:
SimpleTriggerImpl
Trigger
that is used to fire a Job
at a given moment in time,
and optionally repeated at a specified interval.- Author:
- James House, contributions by Lieven Govaerts of Ebitec Nv, Belgium.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.quartz.triggers.Trigger
Trigger.CompletedExecutionInstruction, Trigger.TriggerTimeComparator
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Instructs the
that upon a mis-fire situation, theScheduler
SimpleTrigger
Scheduler
.static final int
Instructs the
that upon a mis-fire situation, theScheduler
SimpleTrigger
, and with the repeat count left unchanged.Calendar
static final int
Instructs the
that upon a mis-fire situation, theScheduler
SimpleTrigger
, and with the repeat count set to what it would be, if it had not missed any firings.Calendar
static final int
Instructs the
that upon a mis-fire situation, theScheduler
SimpleTrigger
Calendar
static final int
Instructs the
that upon a mis-fire situation, theScheduler
SimpleTrigger
Calendar
static final int
Used to indicate the 'repeat count' of the trigger is indefinite.static final long
Fields inherited from interface org.quartz.triggers.Trigger
DEFAULT_PRIORITY, MISFIRE_INSTRUCTION_IGNORE_MISFIRE_POLICY, MISFIRE_INSTRUCTION_SMART_POLICY
-
Method Summary
Modifier and TypeMethodDescriptionint
Get the the number of times theSimpleTrigger
should repeat, after which it will be automatically deleted.long
Get the the time interval (in milliseconds) at which theSimpleTrigger
should repeat.int
Get the number of times theSimpleTrigger
has already fired.Methods inherited from interface java.lang.Comparable
compareTo
Methods inherited from interface org.quartz.triggers.Trigger
equals, getCalendarName, getDescription, getEndTime, getFinalFireTime, getFireTimeAfter, getJobDataMap, getJobName, getMisfireInstruction, getName, getNextFireTime, getPreviousFireTime, getPriority, getStartTime, mayFireAgain
-
Field Details
-
serialVersionUID
static final long serialVersionUID- See Also:
-
MISFIRE_INSTRUCTION_FIRE_NOW
static final int MISFIRE_INSTRUCTION_FIRE_NOWInstructs the
that upon a mis-fire situation, theScheduler
SimpleTrigger
Scheduler
.NOTE: This instruction should typically only be used for 'one-shot' (non-repeating) Triggers. If it is used on a trigger with a repeat count > 0 then it is equivalent to the instruction
.MISFIRE_INSTRUCTION_RESCHEDULE_NOW_WITH_REMAINING_REPEAT_COUNT
- See Also:
-
MISFIRE_INSTRUCTION_RESCHEDULE_NOW_WITH_EXISTING_REPEAT_COUNT
static final int MISFIRE_INSTRUCTION_RESCHEDULE_NOW_WITH_EXISTING_REPEAT_COUNTInstructs the
that upon a mis-fire situation, theScheduler
SimpleTrigger
Calendar
Trigger
end-time however, so if 'now' is after the end-time theTrigger
will not fire again.NOTE: Use of this instruction causes the trigger to 'forget' the start-time and repeat-count that it was originally setup with (this is only an issue if you for some reason wanted to be able to tell what the original values were at some later time).
- See Also:
-
MISFIRE_INSTRUCTION_RESCHEDULE_NOW_WITH_REMAINING_REPEAT_COUNT
static final int MISFIRE_INSTRUCTION_RESCHEDULE_NOW_WITH_REMAINING_REPEAT_COUNTInstructs the
that upon a mis-fire situation, theScheduler
SimpleTrigger
Calendar
Trigger
end-time however, so if 'now' is after the end-time theTrigger
will not fire again.NOTE: Use of this instruction causes the trigger to 'forget' the start-time and repeat-count that it was originally setup with. Instead, the repeat count on the trigger will be changed to whatever the remaining repeat count is (this is only an issue if you for some reason wanted to be able to tell what the original values were at some later time).
NOTE: This instruction could cause the
Trigger
to go to the 'COMPLETE' state after firing 'now', if all the repeat-fire-times where missed.- See Also:
-
MISFIRE_INSTRUCTION_RESCHEDULE_NEXT_WITH_REMAINING_COUNT
static final int MISFIRE_INSTRUCTION_RESCHEDULE_NEXT_WITH_REMAINING_COUNTInstructs the
that upon a mis-fire situation, theScheduler
SimpleTrigger
, and with the repeat count set to what it would be, if it had not missed any firings.Calendar
NOTE/WARNING: This instruction could cause the
Trigger
to go directly to the 'COMPLETE' state if all fire-times where missed.- See Also:
-
MISFIRE_INSTRUCTION_RESCHEDULE_NEXT_WITH_EXISTING_COUNT
static final int MISFIRE_INSTRUCTION_RESCHEDULE_NEXT_WITH_EXISTING_COUNTInstructs the
that upon a mis-fire situation, theScheduler
SimpleTrigger
, and with the repeat count left unchanged.Calendar
NOTE/WARNING: This instruction could cause the
Trigger
to go directly to the 'COMPLETE' state if the end-time of the trigger has arrived.- See Also:
-
REPEAT_INDEFINITELY
static final int REPEAT_INDEFINITELYUsed 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:
-
-
Method Details
-
getRepeatCount
int getRepeatCount()Get the the number of times theSimpleTrigger
should repeat, after which it will be automatically deleted.- See Also:
-
getRepeatInterval
long getRepeatInterval()Get the the time interval (in milliseconds) at which theSimpleTrigger
should repeat. -
getTimesTriggered
int getTimesTriggered()Get the number of times theSimpleTrigger
has already fired.
-