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
Defaultfalse
Definitions
type*Requiredobject
afterstring
Formatdate-time
beforestring
Formatdate-time
datestring
Default{{ trigger.date }}
dayOfWeek*Requiredstring
Possible Values
MONDAYTUESDAYWEDNESDAYTHURSDAYFRIDAYSATURDAYSUNDAY
type*Requiredobject
datestring
Default{{ trigger.date }}
dayInMonth*Requiredstring
Possible Values
FIRSTLASTSECONDTHIRDFOURTH
dayOfWeek*Requiredstring
Possible Values
MONDAYTUESDAYWEDNESDAYTHURSDAYFRIDAYSATURDAYSUNDAY
type*Requiredobject
datestring
Default{{ trigger.date }}
flowId*Requiredstring
namespace*Requiredstring
type*Requiredobject
labels*Requiredarrayobject
type*Requiredobject
namespace*Requiredstring
type*Requiredobject
comparisonstring
Possible Values
EQUALSPREFIXSUFFIX
prefixbooleanstring
Defaultfalse
expression*Requiredbooleanstring
type*Requiredobject
type*Requiredobject
inarray
SubTypestring
Possible Values
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTED
notInarray
SubTypestring
Possible Values
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTED
expression*Requiredstring
type*Requiredobject
flowId*Requiredstring
namespace*Requiredstring
type*Requiredobject
namespace*Requiredstring
type*Requiredobject
prefixboolean
Defaultfalse
type*Requiredobject
inarray
SubTypestring
Possible Values
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTED
notInarray
SubTypestring
Possible Values
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTED
conditions*Requiredobject
id*Requiredstring
Validation RegExp^[a-zA-Z0-9][a-zA-Z0-9_-]*
Min length1
type*Requiredobject
resetOnSuccessboolean
Defaulttrue
timeWindow
Default{ "type": "DURATION_WINDOW" }
deadlinestring
Formatpartial-time
endTimestring
Formatpartial-time
startTimestring
Formatpartial-time
typestring
DefaultDURATION_WINDOW
Possible Values
DAILY_TIME_DEADLINEDAILY_TIME_WINDOWDURATION_WINDOWSLIDING_WINDOW
windowstring
Formatduration
windowAdvancestring
Formatduration
windowDeprecatedstring
Formatduration
windowAdvanceDeprecatedstring
Formatduration
conditions*Required
Min items1
type*Requiredobject
conditions*Required
Min items1
type*Requiredobject
type*Requiredobject
countrystring
datestring
Default{{ trigger.date}}
subDivisionstring
type*Requiredobject
afterstring
Formattime
beforestring
Formattime
datestring
Default{{ trigger.date }}
type*Requiredobject
datestring
Default{{ trigger.date }}
Formatduration
Possible Values
LASTNONEALL
SubTypestring
Possible Values
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTED
DefaultEtc/UTC
Defaultfalse
Formatdate-time
Formatdate-time
Formatdate-time