public interface Schedule
| Modifier and Type | Field and Description |
|---|---|
static long |
WILL_NOT_BE_EXECUTED_AGAIN
If the
nextExecutionInMillis(long, int, Long) returned value is -1,
then the corresponding job will not be executed again. |
static Schedule |
willNeverBeExecuted
A schedule that will always return
WILL_NOT_BE_EXECUTED_AGAIN. |
| Modifier and Type | Method and Description |
|---|---|
long |
nextExecutionInMillis(long currentTimeInMillis,
int executionsCount,
Long lastExecutionEndedTimeInMillis)
Compute the next execution time for a job.
|
static final long WILL_NOT_BE_EXECUTED_AGAIN
nextExecutionInMillis(long, int, Long) returned value is -1,
then the corresponding job will not be executed again.static final Schedule willNeverBeExecuted
WILL_NOT_BE_EXECUTED_AGAIN.long nextExecutionInMillis(long currentTimeInMillis,
int executionsCount,
Long lastExecutionEndedTimeInMillis)
currentTimeInMillis - The current time in milliseconds. This time must be used if
a next execution is planned for the jobexecutionsCount - The number of times a job has already been executedlastExecutionEndedTimeInMillis - The time at which the job has last been executed; will be null
if the job has never been executedcurrentTimeInMillis.
If the returned value is negative, the job will not be executed again.Copyright © 2023 Coreoz. All rights reserved.