Schedule ​Schedule

yaml
type: "io.kestra.plugin.core.trigger.schedule"
yaml
id: scheduled_flow
namespace: company.team

tasks:
  - id: sleep_randomly
    type: io.kestra.plugin.scripts.shell.Commands
    taskRunner:
      type: io.kestra.plugin.core.runner.Process
    commands:
      - echo "{{ trigger.date ?? execution.startDate }}"
      - sleep $((RANDOM % 60 + 1))

triggers:
  - id: every_15_minutes
    type: io.kestra.plugin.core.trigger.Schedule
    cron: "*/15 * * * *"

yaml
    id: daily_flow
    namespace: company.team

    tasks:
      - id: log
        type: io.kestra.plugin.core.log.Log
        message: It's {{ trigger.date ?? taskrun.startDate | date("HH:mm") }}

    triggers:
      - id: schedule
        type: io.kestra.plugin.core.trigger.Schedule
        cron: 30 6 * * *

yaml
id: scheduled_flow
namespace: company.team

tasks:
  - id: log_hello_world
    type: io.kestra.plugin.core.log.Log
    message: Hello World! 🚀

triggers:
  - id: hourly
    type: io.kestra.plugin.core.trigger.Schedule
    cron: "@hourly"

yaml
id: scheduled_flow
namespace: company.team

tasks:
  - id: log_hello_world
    type: io.kestra.plugin.core.log.Log
    message: Hello World! 🚀

triggers:
  - id: schedule
    cron: "0 11 * * 1"
    conditions:
      - type: io.kestra.plugin.core.condition.DayWeekInMonth
        date: "{{ trigger.date }}"
        dayOfWeek: "MONDAY"
        dayInMonth: "FIRST"

yaml
id: business_critical_flow
namespace: company.team

tasks:
  - id: important_task
    type: io.kestra.plugin.core.log.Log
    message: "if this run fails, disable the schedule until the issue is fixed"

triggers:
  - id: stop_after_failed
    type: io.kestra.plugin.core.trigger.Schedule
    cron: "0 9 * * *"
    stopAfter:
      - FAILED
Properties
Format duration
Possible Values
LASTNONEALL
SubType string
Possible Values
CREATEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINT
Default Etc/UTC
Default false
Format date-time
Format date-time
Format date-time
Format partial-time
Format partial-time
Format partial-time
Default DURATION_WINDOW
Possible Values
DAILY_TIME_DEADLINEDAILY_TIME_WINDOWDURATION_WINDOWSLIDING_WINDOW
Format duration
Format duration
Default false
Format time
Format time
Default {{ trigger.date }}
Default {{ trigger.date }}
Possible Values
EQUALSPREFIXSUFFIX
Default false
SubType
Validation RegExp ^[a-zA-Z0-9][a-zA-Z0-9_-]*
Min length 1
Default true
Default { "type": "DURATION_WINDOW" }
Possible Values
FIRSTLASTSECONDTHIRDFOURTH
Possible Values
MONDAYTUESDAYWEDNESDAYTHURSDAYFRIDAYSATURDAYSUNDAY
Default {{ trigger.date }}
Possible Values
MONDAYTUESDAYWEDNESDAYTHURSDAYFRIDAYSATURDAYSUNDAY
Default {{ trigger.date }}
SubType string
Possible Values
CREATEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINT
SubType string
Possible Values
CREATEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINT
Format date-time
Format date-time
Default {{ trigger.date }}
SubType string
Possible Values
CREATEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINT
SubType string
Possible Values
CREATEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINT
Default {{ trigger.date }}