New to Kestra?
Use blueprints to kickstart your first workflows.
Run scheduled flows only on public holidays with Kestra's PublicHoliday schedule condition. Business-aware automation across 70+ countries via cron.
id: schedule-condition-publicholiday
namespace: company.team
triggers:
- id: schedule
type: io.kestra.plugin.core.trigger.Schedule
cron: "0 11 * * *"
when: "{{ isPublicHoliday(trigger.date, 'FR') }}"
tasks:
- id: hello
type: io.kestra.plugin.core.log.Log
message: Demo for PublicHoliday condition
Make your scheduled workflows aware of the calendar. This blueprint shows how to gate a Kestra Schedule trigger with a when Pebble expression built around the isPublicHoliday function, so the flow runs only on public holidays for a given country. It solves a common scheduling gap: plain cron has no notion of holidays, so teams end up hard coding date lists or skipping runs manually. By attaching a holiday check to the trigger's when property, you get business-aware automation that fires (or skips) precisely when the calendar says so.
io.kestra.plugin.core.trigger.Schedule trigger evaluates the cron 0 11 * * *, meaning it considers an execution every day at 11am.when property holds the expression {{ isPublicHoliday(trigger.date, 'FR') }}. The execution only proceeds when the trigger date is a French public holiday.io.kestra.plugin.core.log.Log task runs and emits a demo message confirming the holiday-gated execution fired.The isPublicHoliday function uses the Jollyday library, which ships holiday calendars for more than 70 countries.
isPublicHoliday) to adapt the same flow to any supported country.Kestra lets you express scheduling logic as declarative YAML, with the holiday check sitting right in the trigger's when property instead of buried in task code. Event and schedule triggers, automatic retries, and full execution lineage come built in, so every gated run is observable and replayable. A raw cron scheduler cannot answer "is today a public holiday in this country?" without you maintaining that calendar yourself. The isPublicHoliday function fills exactly that gap.
This blueprint references no secrets.
hello task log the demo message.isPublicHoliday (for example US, DE, IN) to gate on a different national calendar.not(...) so the flow runs on every day that is not a holiday.Log task with real work such as a report, backfill, or notification.when conditions, like dayOfWeek(trigger.date) or isDayWeekInMonth(...), using and/or for richer rules.