Skip to content

Orchestration

Schedules and calendars

Run jobs and job groups on cron schedules or dynamic Python calendars.

Attach a schedule to any job or job group using either a cron expression or a Python calendar. Every schedule requires an IANA timezone.

SQLBuild Web UI Triggers view showing cron schedules and event sensors with status toggles and run historySQLBuild Web UI Triggers view showing cron schedules and event sensors with status toggles and run history
Schedules and sensors on the Triggers page, with per-trigger pause toggles and tick history.
schedule = { cron = "15 2 * * *", timezone = "Europe/London", starts_at = "2026-07-03T00:00:00Z" }
Key Required Value
cron Either cron or calendar Five-field cron expression (no seconds field)
calendar Either cron or calendar Name of a calendar in orchestration/calendars/
timezone Yes IANA timezone name, such as "UTC" or "America/New_York"
starts_at No RFC 3339 timestamp with offset; no ticks fire before it
default_status No running (default) or paused when first published

Under sqb dev, all triggers start paused by default unless you pass --triggers.

Use a calendar when run times come from an external system (such as business cut-offs or holiday schedules). Put one calendar per .py module under orchestration/calendars/ with a name ending in _calendar:

orchestration/calendars/fulfillment/cutoffs.py
from sqlbuild.orchestration import calendar
@calendar(name="fulfillment_calendar", description="Upcoming fulfillment times", horizon="1d")
def fulfillment_calendar(window, fulfillment):
return fulfillment.upcoming(window)

Reference it in a job or group:

schedule = { calendar = "fulfillment_calendar", timezone = "America/New_York" }
  • The function receives window (with timezone-aware start and end in the job’s timezone) plus any project providers named as parameters, and returns timezone-aware datetimes inside window.
  • horizon sets how far ahead the location asks for times. The code location evaluates the calendar on publish and refreshes it before its upcoming times run out (emitting a calendar_horizon_low platform event if a running calendar has a day or less left).
  • See Overlap and retries for how overlapping or missed ticks behave.