
Core Plugins and tasks TimeBetween
CertifiedAllow events between two times of day.
Core Plugins and tasks TimeBetween
Certified
Allow events between two times of day.
Compares the rendered date/time (defaults to the trigger timestamp) against optional after and before offsets (ISO-8601 times).
Supports ranges that cross midnight (e.g., 22: 00→02: 00). At least one bound is required; missing both raises an evaluation error.
yaml
type: io.kestra.plugin.core.condition.TimeBetweenExamples
Trigger condition to execute the flow between two specific times.
yaml
id: schedule_condition_timebetween
namespace: company.team
tasks:
- id: log_message
type: io.kestra.plugin.core.log.Log
message: "This flow will execute every 5 minutes between 4pm and 8pm."
triggers:
- id: schedule
type: io.kestra.plugin.core.trigger.Schedule
cron: "*/5 * * * *"
conditions:
- type: io.kestra.plugin.core.condition.TimeBetween
after: "16:00:00+02:00"
before: "20:00:00+02:00"
Properties
after string
The time to test must be after this one.
Must be a valid ISO 8601 time with offset.
before string
The time to test must be before this one.
Must be a valid ISO 8601 time with offset.
date string
Default
{{ trigger.date }}The time to test.
Can be any variable or any valid ISO 8601 time. By default, it will use the trigger date.