public class CronTrigger extends Object implements Trigger
Trigger implementation for cron expressions.
Wraps a CronSequenceGenerator.CronSequenceGenerator| Constructor and Description |
|---|
CronTrigger(String cronExpression)
Build a
CronTrigger from the pattern provided in the default time zone. |
CronTrigger(String cronExpression,
TimeZone timeZone)
Build a
CronTrigger from the pattern provided. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
String |
getExpression() |
int |
hashCode() |
Date |
nextExecutionTime(TriggerContext triggerContext)
Determine the next execution time according to the given trigger context.
|
String |
toString() |
public CronTrigger(String cronExpression)
CronTrigger from the pattern provided in the default time zone.cronExpression - a space-separated list of time fields,
following cron expression conventionspublic CronTrigger(String cronExpression, TimeZone timeZone)
CronTrigger from the pattern provided.cronExpression - a space-separated list of time fields,
following cron expression conventionstimeZone - a time zone in which the trigger times will be generatedpublic Date nextExecutionTime(TriggerContext triggerContext)
Next execution times are calculated based on the completion time of the previous execution; therefore, overlapping executions won't occur.
nextExecutionTime in interface TriggertriggerContext - context object encapsulating last execution times
and last completion timenull if the trigger won't fire anymorepublic String getExpression()