Source
id: schedule-condition-timebetween
namespace: company.team
tasks:
- id: hello
type: io.kestra.plugin.core.log.Log
message: Demo for TimeBetween condition
triggers:
- id: schedule
type: io.kestra.plugin.core.trigger.Schedule
cron: "@hourly"
conditions:
- type: io.kestra.plugin.core.condition.TimeBetween
date: "{{ trigger.date }}"
after: "08:00:00+02:00"
before: "17:00:00+02:00"
About this blueprint
Core
This flow gets triggered on an hourly basis with the schedule condition that the time falls between 8am and 5pm of +02:00 timezone using the TimeBetween condition.
The TimeBetween condition also works with either the before or after clause
on their own. By providing only the before clause, the condition will evaluate to
true for any date that falls before the before time. Similarly, by providing
only the after clause, the condition will evaluate to true for any date that falls
after the after time.
By providing both the before and after time, the condition will evaluate
to true when the date falls between the before and the after time.
The flow will only get triggered if the associated TimeBetween condition evaluates to true.
More Related Blueprints