Package io.quarkus.scheduler
Interface Trigger
public interface Trigger
Trigger is bound to a scheduled job.
It represents the logic that is used to test if a scheduled job should be executed at a specific time, i.e. the trigger is "fired".
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiongetId()default StringbooleanThe grace period is configurable withScheduled.overdueGracePeriod().
-
Method Details
-
getId
String getId()- Returns:
- the identifier of the job
- See Also:
-
getNextFireTime
Instant getNextFireTime()- Returns:
- the next time at which the trigger is scheduled to fire, or
nullif it will not fire again
-
getPreviousFireTime
Instant getPreviousFireTime()- Returns:
- the previous time at which the trigger fired, or
nullif it has not fired yet
-
isOverdue
boolean isOverdue()The grace period is configurable withScheduled.overdueGracePeriod().Skipped executions are not considered as overdue.
- Returns:
falseif the last execution took place between the expected execution time and the end of the grace period,trueotherwise- See Also:
-
getMethodDescription
- Returns:
- the method description or
nullfor a trigger of a programmatically added job
-