Scheduling

The scheduling system in WowLang defines the governance model for session timing, specifying recurrence rules, dependencies, and constraints. While the actual execution of scheduled instances happens outside of WowLang, the scheduling blocks provide structured guidelines that a runtime system will use to generate concrete occurrences.

Schedule Block Overview

The schedule block in WowLang is used to define when and how frequently a session should occur. It contains several key components that work together to create a flexible and powerful scheduling system.

Schedule Object Properties

Property Type Required Description
recurrence Object Defines repeating patterns for the session.
dependencies Object Specifies before/after session dependencies.
constraints Object Defines optional rules like time windows and approvals.
until String (ISO 8601) The last possible date for this schedule.
exclude Array[String] List of dates to exclude from scheduling (e.g., holidays).

Basic Schedule Example

session "Sprint Planning" {
    schedule {
        recurrence: {
            type: "weekly"
            on: "Monday"
            preferredTime: "10:00 AM"
            timezone: "PST"
            minInterval: "5 days"
            maxInterval: "14 days"
            until: "2026-01-01"
            exclude: ["2025-12-25"]
        }
    }
}

Recurrence Object

The recurrence block is the core component of scheduling in WowLang. It defines how often and when a session should be scheduled, supporting various repetition patterns and timing constraints.

Recurrence Properties

Property Type Required Description
type Enum Defines the recurrence pattern (daily, weekly, monthly, quarterly, yearly, or custom).
on String/Array Specifies the day(s) of recurrence. Required for weekly or monthly types.
preferredTime String The ideal time to schedule the session (e.g., "10:00 AM").
timezone String Specifies the timezone for scheduling. Defaults to UTC.
minInterval String The minimum allowed time between recurrences.
maxInterval String The maximum allowed time between recurrences.
until String (ISO 8601) The final date for this recurrence pattern.
exclude Array[String] List of specific dates that should not be scheduled.

Recurrence Types

Type Description
daily Runs every day, optionally at a preferred time.
weekly Runs on specific weekdays (e.g., "Monday, Wednesday").
monthly Runs on specific days of the month (e.g., "1st of the month").
quarterly Runs every 3 months.
yearly Runs once per year.
custom Allows user-defined interval patterns (e.g., "every 10 days").

Example Recurrence Configurations

Daily at a Specific Time

recurrence: {
    type: "daily"
    preferredTime: "09:00 AM"
    timezone: "UTC"
}

Weekly on Monday and Wednesday

recurrence: {
    type: "weekly"
    on: ["Monday", "Wednesday"]
    preferredTime: "10:00 AM"
    timezone: "PST"
}

Monthly on the 15th

recurrence: {
    type: "monthly"
    on: "15"
    preferredTime: "3:00 PM"
    timezone: "UTC"
}

Custom Interval

recurrence: {
    type: "custom"
    minInterval: "10 days"
}

Yearly Schedule

recurrence: {
    type: "yearly"
    on: "January 1"
}