ALTER TASK GRAPH¶
Modifies the properties, member defaults, or lifecycle state of an existing Task Graph Object.
This command supports the following variants:
- ALTER TASK GRAPH … SET / UNSET: Sets or unsets graph-wide properties, member defaults, the graph’s
WHENcondition, tags, or contacts. - ALTER TASK GRAPH … COMMIT: Freezes staged changes into a new committed version.
- ALTER TASK GRAPH … REVERT: Discards staged changes.
- ALTER TASK GRAPH … RESUME: Starts running the graph on its schedule.
- ALTER TASK GRAPH … SUSPEND: Stops scheduling new runs.
Syntax¶
ALTER TASK GRAPH … SET / UNSET¶
Changes graph-wide properties, member defaults, or the graph’s WHEN condition. The properties are the ones listed in CREATE TASK GRAPH. Once the graph has a committed version, these changes are staged until you COMMIT, whether the graph is resumed or suspended.
Important
SET TASK_DEFAULTS performs a merge, not a replace — it changes only the properties you name, leaving the rest of the set untouched. To remove a default, use UNSET TASK_DEFAULTS ( <property> ). An unqualified UNSET TASK_DEFAULTS (with no property list) is not supported.
ALTER TASK GRAPH … COMMIT¶
Validates the graph and freezes the current shape and settings into a new committed version. The next run uses the new version. COMMIT does not start the schedule and has no SCHEDULE or WHEN requirement.
ALTER TASK GRAPH … REVERT¶
Discards all staged (uncommitted) changes to the graph and its member tasks, restoring them to the most recently committed version. Member tasks that were newly added but never committed are disconnected from the graph rather than dropped. REVERT returns an error if the graph has never been committed.
ALTER TASK GRAPH … RESUME¶
Starts running the graph on its schedule using the most recently committed version. The graph must have a committed version.
Important
A task graph must have a SCHEDULE or a WHEN condition set before it can be resumed. RESUME fails on a graph that has neither.
If you want a graph that never runs on its own and only runs when you trigger it manually with EXECUTE TASK GRAPH, omit both SCHEDULE and WHEN: you can still COMMIT it and run it on demand. To avoid unintended scheduling, don’t call RESUME.
ALTER TASK GRAPH … SUSPEND¶
Stops scheduling new runs of the graph.
Usage notes¶
- A running graph executes against a committed version: a frozen snapshot of the graph’s shape and settings captured when you run
COMMIT. Altering a resumed graph does not disturb runs in progress — changes are staged until the nextCOMMIT. - Use TASK_GRAPH_CHANGES to see exactly what a
COMMITwould deploy or what aREVERTwould discard. COMMIT,RESUME, andSUSPENDrequire the OPERATE privilege on the task graph, or ownership of it. You don’t need OPERATE on the individual member tasks.SETandUNSETrequire ownership of the task graph.
Examples¶
Change graph-wide properties and member defaults:
Commit and resume a graph:
Stage changes, then discard them:
Add or remove a member task. Membership is defined by AFTER relationships reachable from the root; these are ordinary CREATE TASK / ALTER TASK operations that become staged changes on a resumed graph: