Or
Pass when any condition is true.
Or
Pass when any condition is true.
yaml
type: io.kestra.plugin.core.condition.OrExamples
yaml
id: schedule_condition_or
namespace: company.team
tasks:
- id: log_message
type: io.kestra.plugin.core.log.Log
message: "This flow will execute on Sundays and Mondays at 11am."
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
dayOfWeek: "MONDAY"
- type: io.kestra.plugin.core.condition.DayWeek
dayOfWeek: "SUNDAY"
Properties
conditions *RequiredNon-dynamic
Min items
1 Definitions
Allow events only between two datetimes.
afterstring
beforestring
datestring
Default
{{ trigger.date }}typeobject
Possible Values
io.kestra.plugin.core.condition.DateTimeBetweenio.kestra.core.models.conditions.types.DateTimeBetweenConditionio.kestra.plugin.core.condition.DateTimeBetweenConditionAllow events on a specific weekday.
dayOfWeek*Requiredstring
Possible Values
MONDAYTUESDAYWEDNESDAYTHURSDAYFRIDAYSATURDAYSUNDAYdatestring
Default
{{ trigger.date }}typeobject
Possible Values
io.kestra.plugin.core.condition.DayWeekio.kestra.core.models.conditions.types.DayWeekConditionio.kestra.plugin.core.condition.DayWeekConditionAllow events on an nth weekday within the month.
dayInMonth*Requiredstring
Possible Values
FIRSTLASTSECONDTHIRDFOURTHdayOfWeek*Requiredstring
Possible Values
MONDAYTUESDAYWEDNESDAYTHURSDAYFRIDAYSATURDAYSUNDAYdatestring
Default
{{ trigger.date }}typeobject
Possible Values
io.kestra.plugin.core.condition.DayWeekInMonthio.kestra.plugin.core.condition.DayWeekInMonthConditionio.kestra.core.models.conditions.types.DayWeekInMonthConditionMatch events from a specific flow.
flowId*Requiredstring
namespace*Requiredstring
typeobject
Possible Values
io.kestra.plugin.core.condition.ExecutionFlowio.kestra.plugin.core.condition.ExecutionFlowConditionio.kestra.core.models.conditions.types.ExecutionFlowConditionMatch executions by label set.
labels*Requiredarrayobject
typeobject
Possible Values
io.kestra.plugin.core.condition.ExecutionLabelsio.kestra.core.models.conditions.types.ExecutionLabelsConditionio.kestra.plugin.core.condition.ExecutionLabelsConditionMatch executions by namespace.
namespace*Requiredstring
comparisonstring
Possible Values
EQUALSPREFIXSUFFIXprefixbooleanstring
Default
falsetypeobject
Possible Values
io.kestra.plugin.core.condition.ExecutionNamespaceio.kestra.core.models.conditions.types.ExecutionNamespaceConditionio.kestra.plugin.core.condition.ExecutionNamespaceConditionCondition based on the outputs of an upstream execution.
expression*Requiredbooleanstring
typeobject
Possible Values
io.kestra.plugin.core.condition.ExecutionOutputsio.kestra.core.models.conditions.types.ExecutionOutputsConditionio.kestra.plugin.core.condition.ExecutionOutputsConditionMatch executions by status.
inarray
SubTypestring
Possible Values
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTEDnotInarray
SubTypestring
Possible Values
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTEDtypeobject
Possible Values
io.kestra.plugin.core.condition.ExecutionStatusio.kestra.core.models.conditions.types.ExecutionStatusConditionio.kestra.plugin.core.condition.ExecutionStatusConditionCondition based on variable expression.
expression*Requiredstring
typeobject
Possible Values
io.kestra.plugin.core.condition.Expressionio.kestra.plugin.core.condition.ExpressionConditionio.kestra.core.models.conditions.types.VariableConditionMatch executions where a task was retried.
inarray
SubTypestring
Possible Values
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTEDnotInarray
SubTypestring
Possible Values
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTEDtypeobject
Possible Values
io.kestra.plugin.core.condition.HasRetryAttemptio.kestra.plugin.core.condition.HasRetryAttemptConditionio.kestra.core.models.conditions.types.HasRetryAttemptConditionInvert one or more conditions.
conditions*Required
Min items
1typeobject
Possible Values
io.kestra.plugin.core.condition.Notio.kestra.core.models.conditions.types.NotConditionio.kestra.plugin.core.condition.NotConditionAllow events on public holidays.
countrystring
datestring
Default
{{ trigger.date}}subDivisionstring
typeobject
Possible Values
io.kestra.plugin.core.condition.PublicHolidayio.kestra.plugin.core.condition.PublicHolidayConditionio.kestra.core.models.conditions.types.PublicHolidayConditionAllow events between two times of day.
afterstring
beforestring
datestring
Default
{{ trigger.date }}typeobject
Possible Values
io.kestra.plugin.core.condition.TimeBetweenio.kestra.plugin.core.condition.TimeBetweenConditionio.kestra.core.models.conditions.types.TimeBetweenConditionAllow events on weekends.
datestring
Default
{{ trigger.date }}typeobject
Possible Values
io.kestra.plugin.core.condition.Weekendio.kestra.plugin.core.condition.WeekendConditionio.kestra.core.models.conditions.types.WeekendCondition