Blueprints

Executes flow on schedule trigger with Or condition

Source

yaml
id: schedule-condition-or
namespace: company.team

tasks:
  - id: hello
    type: io.kestra.plugin.core.log.Log
    message: Demo for Or condition

triggers:
  - id: schedule
    type: io.kestra.plugin.core.trigger.Schedule
    cron: "0 11 * * *"
    conditions:
      - type: io.kestra.plugin.core.condition.Or
        conditions:
          - type: io.kestra.plugin.core.condition.DayWeek
            date: "{{ trigger.date }}"
            dayOfWeek: MONDAY
          - type: io.kestra.plugin.core.condition.DayWeek
            date: "{{ trigger.date }}"
            dayOfWeek: THURSDAY

About this blueprint

Trigger Schedule

This trigger executes the flow at 11am every day with the schedule condition that the trigger date should either fall on a Monday or a Thursday. In other words, the flow will get executed only on Mondays and Thursdays. With Or condition, you can put multiple conditions of which at least one should evaluate to true for the flow to be executed on the trigger.

Log

Schedule

Or

Day Week

More Related Blueprints

New to Kestra?

Use blueprints to kickstart your first workflows.

Get started with Kestra