Package io.quarkus.scheduler.runtime
Class SimpleScheduler.CronTrigger
- java.lang.Object
-
- io.quarkus.scheduler.runtime.SimpleScheduler.SimpleTrigger
-
- io.quarkus.scheduler.runtime.SimpleScheduler.CronTrigger
-
- All Implemented Interfaces:
Trigger
- Enclosing class:
- SimpleScheduler
static class SimpleScheduler.CronTrigger extends SimpleScheduler.SimpleTrigger
-
-
Field Summary
-
Fields inherited from class io.quarkus.scheduler.runtime.SimpleScheduler.SimpleTrigger
lastFireTime, start
-
-
Constructor Summary
Constructors Constructor Description CronTrigger(String id, ZonedDateTime start, com.cronutils.model.Cron cron, Duration gracePeriod)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) ZonedDateTime
evaluate(ZonedDateTime now)
Instant
getNextFireTime()
Instant
getPreviousFireTime()
boolean
isOverdue()
The grace period is configurable withScheduled.overdueGracePeriod()
.String
toString()
-
Methods inherited from class io.quarkus.scheduler.runtime.SimpleScheduler.SimpleTrigger
getId, isRunning, setRunning
-
-
-
-
Constructor Detail
-
CronTrigger
CronTrigger(String id, ZonedDateTime start, com.cronutils.model.Cron cron, Duration gracePeriod)
-
-
Method Detail
-
getNextFireTime
public Instant getNextFireTime()
- Returns:
- the next time at which the trigger is scheduled to fire, or
null
if it will not fire again
-
getPreviousFireTime
public Instant getPreviousFireTime()
- Returns:
- the previous time at which the trigger fired, or
null
if it has not fired yet
-
evaluate
ZonedDateTime evaluate(ZonedDateTime now)
- Specified by:
evaluate
in classSimpleScheduler.SimpleTrigger
- Returns:
- the scheduled time if fired,
null
otherwise
-
isOverdue
public boolean isOverdue()
Description copied from interface:Trigger
The grace period is configurable withScheduled.overdueGracePeriod()
.This method returns
false
if the last execution has been skipped.- Returns:
true
if the last execution of the trigger is overdue,false
otherwise- See Also:
Scheduled.overdueGracePeriod()
-
-