Class Schedule
java.lang.Object
io.kestra.core.models.triggers.AbstractTrigger
io.kestra.core.models.triggers.types.Schedule
- All Implemented Interfaces:
PollingTriggerInterface,TriggerOutput<Schedule.Output>
@Example(title="A schedule with a backfill",code={"triggers:"," - id: schedule"," type: io.kestra.core.models.triggers.types.Schedule"," cron: \"*/15 * * * *\""," backfill:"," start: 2020-06-25T14:00:00Z"},full=true) @Example(title="A schedule with a nickname",code={"triggers:"," - id: schedule"," type: io.kestra.core.models.triggers.types.Schedule"," cron: \"@hourly\""},full=true) @Example(title="A schedule that run only the first monday on every month at 11 AM",code={"triggers:"," - id: schedule"," cron: \"0 11 * * 1\""," scheduleConditions:"," - id: monday"," date: \"{{ trigger.date }}\""," dayOfWeek: \"MONDAY\""," dayInMonth: \"FIRST\""},full=true)
public class Schedule
extends AbstractTrigger
implements PollingTriggerInterface, TriggerOutput<Schedule.Output>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic class -
Field Summary
FieldsFields inherited from class io.kestra.core.models.triggers.AbstractTrigger
id, type -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionevaluate(ConditionContext conditionContext, TriggerContext context) nextEvaluationDate(ConditionContext conditionContext, Optional<? extends TriggerContext> last) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.kestra.core.models.triggers.PollingTriggerInterface
getInterval
-
Field Details
-
CRON_PARSER
public static final com.cronutils.parser.CronParser CRON_PARSER
-
-
Constructor Details
-
Schedule
public Schedule()
-
-
Method Details
-
nextEvaluationDate
public ZonedDateTime nextEvaluationDate(ConditionContext conditionContext, Optional<? extends TriggerContext> last) - Specified by:
nextEvaluationDatein interfacePollingTriggerInterface
-
evaluate
public Optional<Execution> evaluate(ConditionContext conditionContext, TriggerContext context) throws Exception - Specified by:
evaluatein interfacePollingTriggerInterface- Throws:
Exception
-