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)
Trigger
nextExecutionTime
in interface Trigger
triggerContext
- context object encapsulating last execution times
and last completion timenull
if the trigger won't fire anymorepublic String getExpression()