The scheduleConditions property of Schedule trigger is deprecated. Instead, use conditions to define custom scheduling conditions.

This change is implemented in a non-breaking way, so you don't need to immediately change your existing flows in order to successfully migrate to 0.15.0. However, we recommend using the conditions property at least for new flows. The scheduleConditions property will be removed in the future.

Behavior before Kestra 0.15.0

To make the change clear, here is how scheduling conditions were defined before Kestra 0.15.0:

yaml
id: beverage_order
namespace: dev

inputs:
  - name: beverage
    type: STRING
    defaults: coffee

tasks:
  - id: order_beverage
    type: io.kestra.plugin.fs.http.Request
    uri: https://reqres.in/api/products
    method: POST
    contentType: application/json
    formData:
      beverage: "{{inputs.beverage}}"

  - id: set_labels
    type: io.kestra.core.tasks.executions.Labels
    labels:
      date: "{{trigger.date ?? execution.startDate | date('yyyy-MM-dd')}}"
      beverage: "{{inputs.beverage}}"

triggers:
  - id: workday
    type: io.kestra.core.models.triggers.types.Schedule
    cron: "0 9 * * *"
    scheduleConditions:
      - type: io.kestra.core.models.conditions.types.NotCondition
        conditions:
          - type: io.kestra.core.models.conditions.types.WeekendCondition
  - id: weekend
    type: io.kestra.core.models.triggers.types.Schedule
    cron: "0 20 * * *"
    scheduleConditions:
      - type: io.kestra.core.models.conditions.types.WeekendCondition
    inputs:
      beverage: beer

The above flow has two triggers, workday and weekend.

  1. The workday trigger is scheduled to run on workdays to order a coffee at 9 am.
  2. The weekend trigger is scheduled to run on weekends to order a beer at 8 pm.

Behavior after Kestra 0.15.0

Here is the same flow with the scheduleConditions property replaced by conditions:

yaml
id: beverage_order
namespace: dev

inputs:
  - id: beverage
    type: STRING
    defaults: coffee

tasks:
  - id: order_beverage
    type: io.kestra.plugin.fs.http.Request
    uri: https://reqres.in/api/products
    method: POST
    contentType: application/json
    formData:
      beverage: "{{inputs.beverage}}"

  - id: set_labels
    type: io.kestra.core.tasks.executions.Labels
    labels:
      date: "{{trigger.date ?? execution.startDate | date('yyyy-MM-dd')}}"
      beverage: "{{inputs.beverage}}"

triggers:
  - id: workday
    type: io.kestra.core.models.triggers.types.Schedule
    cron: "0 9 * * *"
    conditions:
      - type: io.kestra.core.models.conditions.types.NotCondition
        conditions:
          - type: io.kestra.core.models.conditions.types.WeekendCondition

  - id: weekend
    type: io.kestra.core.models.triggers.types.Schedule
    cron: "0 20 * * *"
    conditions:
      - type: io.kestra.core.models.conditions.types.WeekendCondition
    inputs:
      beverage: beer