Schedule
type: "io.kestra.core.models.triggers.types.Schedule"
Schedule a flow based on cron date
Kestra is able to trigger flow based on Schedule (aka the time). If you need to wait another system to be ready and can't use any event mechanism, you can schedule 1 or more time for the current flow.
The scheduler will keep the last execution date for this schedule based on the id. This allow you to change the cron expression without restart all the past execution (if backfill exists) If you changed the current id, the scheduler will think it's a new schedule and will start with a fresh date and replay the all backfill date (if backfill exists)
Examples
A schedule with a backfill
triggers:
- id: schedule
type: io.kestra.core.models.triggers.types.Schedule
cron: "*/15 * * * *"
backfill:
start: 2020-06-25T14:00:00Z
A schedule with a nickname
triggers:
- id: schedule
type: io.kestra.core.models.triggers.types.Schedule
cron: "@hourly"
A schedule that run only the first monday on every month at 11 AM
triggers:
- id: schedule
cron: "0 11 * * 1"
scheduleConditions:
- id: monday
date: "{{ trigger.date }}"
dayOfWeek: "MONDAY"
dayInMonth: "FIRST"
Properties
cron
- Type: string
- Dynamic: ❌
- Required: ✔️
the cron expression
a standard unix cron expression without second. Can also be a cron extensions / nicknames:
@yearly
@annually
@monthly
@weekly
@daily
@midnight
@hourly
backfill
- Type: ScheduleBackfill
- Dynamic: ❌
- Required: ❌
Backfill options in order to fill missing previous past date
Kestra will handle optionally a backfill. The concept of backfill is the replay the missing schedule because we create the flow later.
Backfill will do all schedules between define date & current date and will start after the normal schedule.
inputs
- Type: object
- SubType: string
- Dynamic: ✔️
- Required: ❌
The input to pass to the triggered flow
interval
- Type: string
- Dynamic: ❌
- Required: ❌
- Default:
PT1S
- Format:
duration
Interval between polling
The interval between 2 different test of schedule, this can avoid to overload the remote system with too many call. For most of trigger that depend on external system, a minimal interval must be at least PT30S. See ISO_8601 Durations for more information of available interval value
lateMaximumDelay
- Type: string
- Dynamic: ❌
- Required: ❌
- Format:
duration
The maximum late delay accepted
If the schedule didn't start after this delay, the execution will be skip.
scheduleConditions
- Type: array
- SubType: ScheduleCondition
- Dynamic: ❌
- Required: ❌
List of schedule Conditions in order to limit schedule date.
timezone
- Type: string
- Dynamic: ❌
- Required: ❌
- Default:
Etc/UTC
The time zone id to use for evaluate cron. Default value is the server default zone id.
Outputs
date
- Type: string
The date of current schedule
next
- Type: string
The date of next schedule
previous
- Type: string
The date of previous schedule
Definitions
ScheduleBackfill
start
- Type: string
- Dynamic: ❓
- Required: ❌
The first start date