public interface ExecutionTime
| Modifier and Type | Method and Description |
|---|---|
default int |
countExecutions(ZonedDateTime startDate,
ZonedDateTime endDate)
Provide count of times cron expression would execute between given start and end dates
|
static ExecutionTime |
forCron(Cron cron)
Creates execution time for given Cron.
|
default List<ZonedDateTime> |
getExecutionDates(ZonedDateTime startDate,
ZonedDateTime endDate)
Provide date times when cron expression would execute between given start and end dates.
|
boolean |
isMatch(ZonedDateTime date)
Provide feedback if a given date matches the cron expression.
|
Optional<ZonedDateTime> |
lastExecution(ZonedDateTime date)
Provide nearest date for last execution.
|
Optional<ZonedDateTime> |
nextExecution(ZonedDateTime date)
Provide nearest date for next execution.
|
Optional<Duration> |
timeFromLastExecution(ZonedDateTime date)
Provide nearest time from last execution.
|
Optional<Duration> |
timeToNextExecution(ZonedDateTime date)
Provide nearest time for next execution.
|
static ExecutionTime forCron(Cron cron)
cron - - Cron instanceOptional<ZonedDateTime> nextExecution(ZonedDateTime date)
date - - ZonedDateTime instance. If null, a NullPointerException will be raised.Optional<Duration> timeToNextExecution(ZonedDateTime date)
date - - ZonedDateTime instance. If null, a NullPointerException will be raised.Optional<ZonedDateTime> lastExecution(ZonedDateTime date)
date - - ZonedDateTime instance. If null, a NullPointerException will be raised.Optional<Duration> timeFromLastExecution(ZonedDateTime date)
date - - ZonedDateTime instance. If null, a NullPointerException will be raised.boolean isMatch(ZonedDateTime date)
date - - ZonedDateTime instance. If null, a NullPointerException will be raised.default int countExecutions(ZonedDateTime startDate, ZonedDateTime endDate)
startDate - - Start date. If null, a NullPointerException will be raised.endDate - - End date. If null, a NullPointerException will be raised.default List<ZonedDateTime> getExecutionDates(ZonedDateTime startDate, ZonedDateTime endDate)
startDate - - Start date. If null, a NullPointerException will be raised.endDate - - End date. If null, a NullPointerException will be raised.Copyright © 2023. All rights reserved.