Source
yaml
id: schedule-condition-not
namespace: company.team
tasks:
- id: hello
type: io.kestra.plugin.core.log.Log
message: Demo for Not condition
triggers:
- id: schedule
type: io.kestra.plugin.core.trigger.Schedule
cron: "0 11 * * *"
conditions:
- type: io.kestra.plugin.core.condition.Not
conditions:
- type: io.kestra.plugin.core.condition.DayWeek
date: "{{ trigger.date }}"
dayOfWeek: MONDAY
About this blueprint
Trigger Schedule
This trigger executes the flow at 11am every day with the schedule condition that the trigger date should not fall on a Monday. In other words, the flow will execute every day at 11am except on Mondays. With the Not condition, you can put a negation of the condition. In the given flow, we are negating the condition of the DayWeek of the trigger date being a Monday. The Not condition can be used along with both Schedule and Flow triggers.
More Related Blueprints