Log icon
Schedule icon
DayWeekInMonth icon

Run a flow on the first Monday of each month at 11 AM

Run Kestra workflows only on the first Monday of each month at 11 AM. Combine a cron Schedule trigger with a DayWeekInMonth condition for precise monthly timing.

Categories
Core
id: every-monday
namespace: company.team

tasks:
  - id: log_trigger_or_execution_date
    type: io.kestra.plugin.core.log.Log
    message: "{{ trigger.date ?? execution.startDate }}"

triggers:
  - id: first_monday_of_the_month
    type: io.kestra.plugin.core.trigger.Schedule
    timezone: Europe/Berlin
    cron: 0 11 * * MON
    conditions:
      - type: io.kestra.plugin.core.condition.DayWeekInMonth
        date: "{{ trigger.date }}"
        dayOfWeek: MONDAY
        dayInMonth: FIRST

Plain cron expressions cannot express calendar rules like "the first Monday of the month." This flow solves that gap by pairing a standard io.kestra.plugin.core.trigger.Schedule trigger with a io.kestra.plugin.core.condition.DayWeekInMonth condition, so the workflow fires only on the first Monday of every month at 11 AM Europe/Berlin time. It is a reusable scheduling pattern for monthly reports, billing runs, kickoff jobs, and any task that must land on a specific weekday-of-month rather than a fixed calendar date.

How it works

  • The first_monday_of_the_month trigger is a io.kestra.plugin.core.trigger.Schedule with cron: 0 11 * * MON, which evaluates every Monday at 11 AM in the Europe/Berlin timezone.
  • A io.kestra.plugin.core.condition.DayWeekInMonth condition narrows that down: it checks {{ trigger.date }} for dayOfWeek: MONDAY and dayInMonth: FIRST, so only the first Monday actually starts an execution.
  • The single log_trigger_or_execution_date task (io.kestra.plugin.core.log.Log) prints {{ trigger.date ?? execution.startDate }}, confirming the scheduled date when run by the trigger and falling back to the execution start date on manual runs.

What you get

  • A precise "first Monday of the month" schedule without hand-crafting fragile cron math.
  • Correct timezone handling via the Europe/Berlin setting on the trigger.
  • A safe verification step that logs the resolved date so you can confirm the timing is right.

Who it's for

  • Data and platform engineers who need monthly jobs anchored to a weekday rather than a date.
  • Teams running recurring monthly reports, invoicing, or review cycles.
  • Anyone learning how to combine Kestra schedules with conditions.

Why orchestrate this with Kestra

Most schedulers and cron tools only accept date or weekday patterns, not "nth weekday of the month" rules. Kestra layers declarative trigger conditions on top of cron, so calendar logic lives in readable YAML instead of brittle expressions. You also get retries, full execution history, and lineage out of the box, and the same flow can later orchestrate downstream tasks once the timing fires correctly.

Prerequisites

  • A running Kestra instance.

Secrets

  • None. This flow uses only core scheduling and logging tasks.

Quick start

  1. Add this flow to your Kestra instance.
  2. Adjust the timezone on the trigger if you are not in Europe/Berlin.
  3. Wait for the next first Monday, or trigger a manual execution to test the log task.
  4. Inspect the execution logs to confirm the resolved date.

How to extend

  • Change dayInMonth to SECOND, THIRD, FOURTH, or LAST to retime the run.
  • Switch dayOfWeek to target a different weekday.
  • Replace the Log task with real work: a report build, an export, or a downstream Subflow call.

Links

Share this Blueprint
See How

New to Kestra?

Use blueprints to kickstart your first workflows.