public final class EmbeddedCronParser extends Object
The pattern comprises a list of six single space-separated fields: second, minute, hour, day, month, weekday.
Month and weekday names can be given as the first three letters of the English names.
| Constructor and Description |
|---|
EmbeddedCronParser(String expression)
Construct a
EmbeddedCronParser from the pattern provided, using the
default TimeZone. |
EmbeddedCronParser(String expression,
TimeZone timeZone)
Construct a
EmbeddedCronParser from the pattern provided, using the
specified TimeZone. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object other) |
int |
hashCode() |
long |
next(long date)
Get the next
Date in the sequence matching the Cron pattern and after
the value provided. |
String |
toString() |
public EmbeddedCronParser(String expression)
EmbeddedCronParser from the pattern provided, using the
default TimeZone.expression - a space-separated list of time fieldsIllegalArgumentException - if the pattern cannot be parsedTimeZone.getDefault()public EmbeddedCronParser(String expression, TimeZone timeZone)
EmbeddedCronParser from the pattern provided, using the
specified TimeZone.expression - a space-separated list of time fieldstimeZone - the TimeZone to use for generated trigger timesIllegalArgumentException - if the pattern cannot be parsedpublic long next(long date)
Date in the sequence matching the Cron pattern and after
the value provided. The return value will have a whole number of seconds, and
will be after the input value.date - a seed valueCopyright © 2013–2021 The Apache Software Foundation. All rights reserved.