Class CronTrigger
- All Implemented Interfaces:
Serializable,Trigger
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCronTrigger(long timestamp, Date startTime, Date endTime, int repeatLimit, String cronExpression, String[] calendarNames, Calendars calendars) CronTrigger(long timestamp, Date startTime, Date endTime, int repeatLimit, CronExpression cronExpression, String[] calendarNames, Calendars calendars) -
Method Summary
Modifier and TypeMethodDescriptionstatic CronExpressiondetermineCronExpression(String cronExpression) String[]Get the time at which theCronTriggershould quit repeating - even if repeastCount isn't yet satisfied.Returns the next time at which theTriggeris scheduled to fire.Returns the previous time at which theCronTriggerfired.intintprotected DategetTimeAfter(Date afterTime) Returns the time zone for which thecronExpressionof thisCronTriggerwill be resolved.voidsetCalendarNames(String[] calendarNames) voidsetCalendars(Calendars calendars) voidsetCronEx(CronExpression cronEx) voidsetCronExpression(String cronExpression) voidsetCronExpression(CronExpression cronExpression) voidsetEndTime(Date endTime) voidReturns the next time at which theCronTriggerwill fire, after the given time.voidsetNextFireTime(Date nextFireTime) Sets the next time at which theCronTriggerwill fire.voidsetPreviousFireTime(Date previousFireTime) Set the previous time at which theCronTriggerfired.voidsetRepeatCount(int repeatCount) voidsetRepeatLimit(int repeatLimit) voidsetStartTime(Date startTime) voidsetTimeZone(TimeZone timeZone) Sets the time zone for which thecronExpressionof thisCronTriggerwill be resolved.voidMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.drools.base.time.Trigger
initialize
-
Field Details
-
YEAR_TO_GIVEUP_SCHEDULING_AT
protected static final int YEAR_TO_GIVEUP_SCHEDULING_AT- See Also:
-
-
Constructor Details
-
CronTrigger
public CronTrigger() -
CronTrigger
-
CronTrigger
public CronTrigger(long timestamp, Date startTime, Date endTime, int repeatLimit, CronExpression cronExpression, String[] calendarNames, Calendars calendars)
-
-
Method Details
-
getStartTime
-
setStartTime
-
getEndTime
Get the time at which the
CronTriggershould quit repeating - even if repeastCount isn't yet satisfied. -
setEndTime
-
getNextFireTime
Returns the next time at which the
Triggeris scheduled to fire. If the trigger will not fire again,nullwill be returned. Note that the time returned can possibly be in the past, if the time that was computed for the trigger to next fire has already arrived, but the scheduler has not yet been able to fire the trigger (which would likely be due to lack of resources e.g. threads).The value returned is not guaranteed to be valid until after the
Triggerhas been added to the scheduler. -
getPreviousFireTime
Returns the previous time at which the
CronTriggerfired. If the trigger has not yet fired,nullwill be returned. -
setNextFireTime
Sets the next time at which the
CronTriggerwill fire. This method should not be invoked by client code. -
setPreviousFireTime
Set the previous time at which the
CronTriggerfired.This method should not be invoked by client code.
-
getTimeZone
Returns the time zone for which the
cronExpressionof thisCronTriggerwill be resolved. -
setTimeZone
Sets the time zone for which the
cronExpressionof thisCronTriggerwill be resolved.If
setCronExpression(CronExpression)is called after this method, the TimeZon setting on the CronExpression will "win". However ifsetCronExpression(String)is called after this method, the time zone applied by this method will remain in effect, since the String cron expression does not carry a time zone! -
setCronExpression
-
setCronExpression
-
getCronEx
-
setCronEx
-
getRepeatLimit
public int getRepeatLimit() -
setRepeatLimit
public void setRepeatLimit(int repeatLimit) -
getRepeatCount
public int getRepeatCount() -
setRepeatCount
public void setRepeatCount(int repeatCount) -
getCalendarNames
-
setCalendarNames
-
getCalendars
-
setCalendars
-
determineCronExpression
-
hasNextFireTime
- Specified by:
hasNextFireTimein interfaceTrigger
-
nextFireTime
- Specified by:
nextFireTimein interfaceTrigger
-
setFirstFireTimeAfter
public void setFirstFireTimeAfter()Returns the next time at which the
CronTriggerwill fire, after the given time. If the trigger will not fire after the given time,nullwill be returned.Note that the date returned is NOT validated against the related org.quartz.Calendar (if any)
-
getTimeAfter
-
updateToNextIncludeDate
public void updateToNextIncludeDate()
-