Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

TaskSchedule

A TaskSchedule creates Tasks on a cron-based schedule from a template task. Use this to automate recurring work like daily reports, periodic data processing, or scheduled monitoring runs.

Defining a TaskSchedule

apiVersion: orloj.dev/v1
kind: TaskSchedule
metadata:
  name: weekly-report
spec:
  task_ref: weekly-report-template
  schedule: "0 9 * * 1"
  time_zone: America/Chicago
  suspend: false
  starting_deadline_seconds: 300
  concurrency_policy: forbid
  successful_history_limit: 10
  failed_history_limit: 3

Key Fields

FieldDescription
task_refReference to a Task with mode: template.
scheduleStandard 5-field cron expression.
time_zoneIANA timezone (defaults to UTC).
concurrency_policyforbid prevents overlapping runs.
starting_deadline_secondsMaximum lateness before a missed trigger is skipped.
suspendSet to true to pause scheduling without deleting the resource.

How It Works

When the cron fires, the scheduler:

  1. Checks concurrency_policy -- if forbid and a previous run is still active, the trigger is skipped.
  2. Checks starting_deadline_seconds -- if the trigger is later than the deadline, it is skipped.
  3. Creates a new Task from the template, inheriting all spec fields from the referenced task.
  4. The new task enters Pending and follows the normal Task lifecycle.

Related