New to Kestra?
Use blueprints to kickstart your first workflows.
Restrict Kestra workflow executions to weekends with the Weekend schedule condition. Run a daily cron that only fires on Saturdays and Sundays, declaratively in YAML.
id: schedule-condition-weekend
namespace: company.team
triggers:
- id: schedule
type: io.kestra.plugin.core.trigger.Schedule
cron: "0 11 * * *"
when: "{{ isWeekend(trigger.date) }}"
tasks:
- id: hello
type: io.kestra.plugin.core.log.Log
message: Demo for Weekend condition
Some jobs should only run on weekends: heavy batch reprocessing, weekly rollup reports, maintenance windows, or cleanup tasks that would compete with weekday production traffic. This blueprint shows how to schedule a flow with a daily cron and then gate it with the io.kestra.plugin.core.condition.Weekend condition so it executes only on Saturdays and Sundays. You get weekend-only scheduling without writing custom date logic, branching, or calendar checks inside your tasks.
io.kestra.plugin.core.trigger.Schedule trigger named schedule fires every day at 11:00 with the cron expression 0 11 * * *.conditions list containing a single io.kestra.plugin.core.condition.Weekend condition. On each cron tick Kestra evaluates the condition against the trigger date.hello task (io.kestra.plugin.core.log.Log) writes a message confirming the weekend run.Weekend condition handles day-of-week logic for you.A plain cron daemon can express a time of day, but layering business rules like "only weekends" on top of a single readable schedule usually means scattering date checks across scripts. Kestra keeps the schedule and the rule together: the cron defines cadence, the Weekend condition defines eligibility, and both live in version-controlled declarative YAML. You also gain retries, event-driven triggers, full execution lineage, and a UI that shows exactly when and why each run fired, none of which a bare crontab provides.
This flow references no secrets.
schedule trigger activates automatically.hello Log task with your real workload (batch SQL, file processing, report generation).0 11 * * * to a different weekend run time.Weekend condition with other conditions (for example a DayWeek or time-window condition) to narrow eligibility further.