Skip to main content
Version: v5.7.0

Scheduled activity

Included from Basic tier

A scheduled activity is one standing instruction to create a change or a workflow run on a schedule — a repeating 5-field cron expression or a one-off instant (run_at). Rows are created against a node, carry an executing identity (run_as) and an owning group (owned_by), and the engine fires them when next_run_at falls due. Served by the v2 ScheduledActivityService (ListScheduledActivities, GetScheduledActivity, CreateScheduledActivity, UpdateScheduledActivity, DeleteScheduledActivity).

ScheduledActivity​

ScheduledActivity is one scheduled_change/scheduled_workflow row: the typed row fields the index screens consume, plus the full stored attribute document for the detail views. The attribute payload varies by type (scheduled changes carry git/commit-filter fields, scheduled workflows the version pin and inputs), so it travels as a JSON document beside the shared fields — the WorkflowStep precedent.

FieldTypeMeaning
actionstringThe scheduled change's action; empty on workflow rows.
activity_typeActivityTypeWhat it schedules.
asset_codestringThe owning asset's code; empty when the owning node sits above asset level.
asset_namestringThe owning asset's display name; empty when the owning node sits above asset level.
attributes_jsonstringThe row's full stored attribute document as JSON text (metadata, notify, overrides, run_at/end_at, git and commit-filter fields, version pin …).
created_attimestampWhen the record was created.
created_bystringUsername of the creating identity.
cron_schedulestringThe repeating schedule's 5-field cron expression (UTC wall-clock); empty on a one-off row, whose run_at instant rides attributes_json.
enabledbooleanWhether the record is enabled.
environment_codestringThe owning environment's code; empty when the owning node sits above environment level.
environment_namestringThe owning environment's display name; empty when the owning node sits above environment level.
idstringThe record's identity.
new_commits_onlybooleanScheduled changes only: fire only when the remote carries new commits.
next_run_attimestampWhen the schedule next fires; the engine fires rows whose instant is at or before now, and a repeating row advances to its next cron occurrence after each firing.
node_pathstringThe owning node's path (v1's links.parent, typed).
owned_bystringThe owning group carrying maintenance and failure-notification accountability.
project_codestringThe owning project's code.
project_namestringThe owning project's display name.
repeatbooleanWhether the schedule repeats after firing (true with a cron expression; false on a one-off).
run_asstringThe identity the firings execute as; unset executes as created_by.
updated_attimestampWhen the record was last updated.
workflow_codestringThe scheduled workflow's code; empty on change rows.

Limits on the create and update payloads​

Two bounds ride CreateScheduledActivity / UpdateScheduledActivity beside the schedule (and land in attributes_json on the row):

FieldTypeMeaning
maximum_run_countint (optional)Fire at most this many times, successes and failures alike; unset never bounds the count. A schedule already at the bound is disabled instead of fired. On update a present value replaces the stored bound, absent preserves it.
allow_parallel_executionboolean (optional)Allow a firing while an earlier run of this schedule is still active; unset keeps the server default (no parallel execution — the overlap guard skips the firing). On update a present value replaces the stored flag, absent preserves it.

The GUI's schedule dialog carries both as Maximum run count and Allow parallel execution, on create and edit.

ScheduledActivityFilter​

ScheduledActivityFilter is the typed scheduled-activities vocabulary. All fields combine with AND; empty fields do not restrict.

FieldTypeMeaning
actionstringThe scheduled change's action (exact — the v1 filter[action_eq]).
node_pathstringExact path of the owning node (the v1 node-path scoped index), e.g. "/projects/web/environments/dev".
workflow_codestringThe scheduled workflow's code (exact).

ScheduleSpec​

ScheduleSpec is a scheduled activity's firing schedule: exactly one of a cron expression (repeating) or a one-off instant. Supplying it on an update replaces both halves — the v1 lane's explicit-null XOR switch, typed.

  • opschain docs scheduled-activities — the component page: the firing engine, deferral and failure handling.
  • opschain docs resources/activity — the runs a firing creates, and the scheduled_activity_id filter that finds them.
  • opschain docs resources/change and opschain docs resources/workflow_run — what gets created.