|
| 1 | +--- |
| 2 | +id: workflow-pause |
| 3 | +title: Workflow Pause |
| 4 | +sidebar_label: Workflow Pause |
| 5 | +description: Pause and Unpause a Workflow Execution to stop new progress without terminating the Workflow or losing state. |
| 6 | +slug: /workflow-pause |
| 7 | +toc_max_heading_level: 4 |
| 8 | +keywords: |
| 9 | + - Workflow |
| 10 | + - Workflow Pause |
| 11 | + - pause |
| 12 | + - unpause |
| 13 | + - operations |
| 14 | +tags: |
| 15 | + - Concepts |
| 16 | + - Workflows |
| 17 | +--- |
| 18 | + |
| 19 | +This page discusses the following: |
| 20 | + |
| 21 | +- [Pause](#pause) |
| 22 | +- [Unpause](#unpause) |
| 23 | +- [Observability](#observability) |
| 24 | +- [What Workflow Pause is not](#what-workflow-pause-is-not) |
| 25 | +- [Important considerations](#important-considerations) |
| 26 | +- [Limitations](#limitations) |
| 27 | + |
| 28 | +Workflow Pause is an operational control that stops a specific [Workflow Execution](/workflow-execution) from making new |
| 29 | +progress until it is Unpaused. |
| 30 | + |
| 31 | +Use Workflow Pause when you need to hold a Workflow in place during an incident, investigation, or dependency outage |
| 32 | +without terminating the Workflow Execution or losing Workflow state. |
| 33 | + |
| 34 | +You can Pause and Unpause Workflow Executions through the [CLI](/cli/command-reference/workflow), the UI, or directly |
| 35 | +through the gRPC API. |
| 36 | + |
| 37 | +:::note Pre-release |
| 38 | + |
| 39 | +Workflow Pause is in [Pre-release](/evaluate/development-production-features/release-stages#pre-release). In Temporal |
| 40 | +Cloud, Pre-release access is invite-only; contact your Temporal account team or |
| 41 | +[open a support ticket](/cloud/support#support-ticket). For self-hosted Temporal, Workflow Pause requires Temporal |
| 42 | +Server v1.30.0+ with `frontend.WorkflowPauseEnabled` enabled. The Temporal CLI requires v1.6.0+. Self-hosted UI support |
| 43 | +requires v2.47.2+. |
| 44 | + |
| 45 | +::: |
| 46 | + |
| 47 | +## Operations summary |
| 48 | + |
| 49 | +| Operation | What it does | CLI | |
| 50 | +| ----------------- | ---------------------------------------------------- | -------------------------------------------------------------------- | |
| 51 | +| [Pause](#pause) | Stops a Workflow Execution from making new progress. | [`temporal workflow pause`](/cli/command-reference/workflow#pause) | |
| 52 | +| [Unpause](#unpause) | Resumes a Paused Workflow Execution. | [`temporal workflow unpause`](/cli/command-reference/workflow#unpause) | |
| 53 | + |
| 54 | +## Pause |
| 55 | + |
| 56 | +Pause stops a Workflow Execution from making new progress until it is Unpaused. |
| 57 | + |
| 58 | +### When to pause |
| 59 | + |
| 60 | +- A downstream dependency is unhealthy, and you want to stop the Workflow from continuing until the dependency recovers. |
| 61 | +- You need time to inspect or fix an issue before the Workflow schedules more work. |
| 62 | +- You're rolling out a Worker change and want to hold specific Workflow Executions until the deploy is complete. |
| 63 | +- You want to prevent a Workflow from continuing without terminating it or losing its current state. |
| 64 | + |
| 65 | +### What happens when you Pause a Workflow |
| 66 | + |
| 67 | +- **No new Workflow Tasks are dispatched.** Workflow code doesn't make progress while the Workflow is Paused. |
| 68 | +- **No new Activity Tasks are dispatched.** Activity retries and newly scheduled Activity Tasks don't start while the |
| 69 | + Workflow is Paused. |
| 70 | +- **In-flight Activity attempts aren't interrupted.** Activity attempts that are already running can complete, fail, |
| 71 | + time out, and Heartbeat normally. |
| 72 | +- **Activity completion, failure, and timeout events can be recorded.** Workflow code doesn't process those events until |
| 73 | + the Workflow is Unpaused. |
| 74 | +- **Signals are accepted and recorded.** Signal handlers run after the Workflow is Unpaused. |
| 75 | +- **Timers keep advancing.** Timers that fire while Paused are processed by Workflow code after the Workflow is |
| 76 | + Unpaused. |
| 77 | +- **Updates and Queries are rejected.** |
| 78 | +- **Cancel requests are recorded.** Cancellation takes effect after the Workflow is Unpaused. |
| 79 | +- **Terminate requests still terminate the Workflow immediately.** |
| 80 | +- **Pause is recorded in Event History.** The Event includes the identity, reason, and request ID. |
| 81 | + |
| 82 | +### CLI usage |
| 83 | + |
| 84 | +```bash |
| 85 | +temporal workflow pause \ |
| 86 | + --workflow-id YourWorkflowId \ |
| 87 | + --reason "Pausing while downstream service recovers" |
| 88 | +``` |
| 89 | + |
| 90 | +See the [CLI reference for `temporal workflow pause`](/cli/command-reference/workflow#pause) for all options. |
| 91 | + |
| 92 | +## Unpause |
| 93 | + |
| 94 | +Unpause resumes a Paused Workflow Execution. |
| 95 | + |
| 96 | +### When to unpause |
| 97 | + |
| 98 | +- The dependency or service that caused the Pause has recovered. |
| 99 | +- Investigation is complete and the Workflow can continue. |
| 100 | +- A deploy or configuration change is complete. |
| 101 | +- You're ready for queued Signals, recorded cancellation, or blocked work to proceed. |
| 102 | + |
| 103 | +### What happens when you Unpause a Workflow |
| 104 | + |
| 105 | +- **Workflow Tasks and Activity Tasks can be dispatched again.** |
| 106 | +- **Signals received and Timers that fired while Paused are processed by the Workflow.** |
| 107 | +- **Pending Activity retries can proceed unless the Activity itself is Paused.** |
| 108 | +- **The Workflow continues from its existing state.** |
| 109 | +- **Unpause is recorded in Event History.** The Event includes the identity, reason, and request ID. |
| 110 | + |
| 111 | +### CLI usage |
| 112 | + |
| 113 | +```bash |
| 114 | +temporal workflow unpause \ |
| 115 | + --workflow-id YourWorkflowId \ |
| 116 | + --reason "Downstream service recovered" |
| 117 | +``` |
| 118 | + |
| 119 | +See the [CLI reference for `temporal workflow unpause`](/cli/command-reference/workflow#unpause) for all options. |
| 120 | + |
| 121 | +## Observability |
| 122 | + |
| 123 | +Paused Workflow Executions have `ExecutionStatus="Paused"`. |
| 124 | + |
| 125 | +You can find Paused Workflow Executions with a [List Filter](/list-filter): |
| 126 | + |
| 127 | +```sql |
| 128 | +ExecutionStatus = "Paused" |
| 129 | +``` |
| 130 | + |
| 131 | +You can also inspect a Workflow Execution with: |
| 132 | + |
| 133 | +```bash |
| 134 | +temporal workflow describe \ |
| 135 | + --workflow-id YourWorkflowId |
| 136 | +``` |
| 137 | + |
| 138 | +Pause and Unpause are recorded in [Event History](/workflow-execution/event#event-history) with the identity, reason, and |
| 139 | +request ID. |
| 140 | + |
| 141 | +## What Workflow Pause is not |
| 142 | + |
| 143 | +- Workflow Pause isn't Activity Pause. To interrupt a Heartbeating Activity attempt, use |
| 144 | + [Activity Pause](/activity-operations#pause). |
| 145 | +- Workflow Pause isn't bulk Workflow Pause. It applies to one Workflow Execution at a time. |
| 146 | +- Workflow Pause doesn't pause [Schedules](/schedule), Task Queues, or Namespaces. |
| 147 | +- Workflow Pause isn't an auto-pause policy. Operators must Pause and Unpause manually through an operational interface. |
| 148 | + |
| 149 | +## Important considerations |
| 150 | + |
| 151 | +### Scope |
| 152 | + |
| 153 | +- Workflow Pause applies to a single Workflow Execution. |
| 154 | +- It doesn't pause [Child Workflows](/child-workflows), Activities, Schedules, Task Queues, or Namespaces. |
| 155 | + |
| 156 | +### Timeouts and in-flight work |
| 157 | + |
| 158 | +- Workflow Pause doesn't stop time from passing. Workflow Execution timeouts, Workflow Run timeouts, Activity timeouts, |
| 159 | + and Timer deadlines continue to advance. |
| 160 | +- Activity attempts that are already running aren't interrupted. They can complete, fail, Heartbeat, or time out while |
| 161 | + the Workflow is Paused. |
| 162 | + |
| 163 | +### Messages and lifecycle operations |
| 164 | + |
| 165 | +- Signals are accepted while Paused and processed after the Workflow is Unpaused. |
| 166 | +- Updates and Queries are rejected while Paused. |
| 167 | +- Cancel requests are recorded while Paused, but cancellation takes effect after the Workflow is Unpaused. |
| 168 | +- [Terminate](/evaluate/development-production-features/interrupt-a-workflow) requests still terminate the Workflow |
| 169 | + immediately. |
| 170 | +- Resetting a Paused Workflow terminates the current Run and starts a new Run from the selected reset point. |
| 171 | + |
| 172 | +### Schedules, cron, and operation timing |
| 173 | + |
| 174 | +- A Paused Run is still considered active for [Schedule](/schedule) overlap policy decisions. |
| 175 | +- For [Cron Workflows](/cron-job), Pause affects the current Run. Missed cron intervals are not backfilled. |
| 176 | +- Pause and Unpause aren't a transactional boundary. Work can make progress while the Workflow is Unpaused. |
| 177 | + |
| 178 | +### Billing |
| 179 | + |
| 180 | +In Temporal Cloud, pausing a Workflow Execution stops progress but doesn't end the Workflow Execution. |
| 181 | +Its Event History continues to count toward [Active Storage](/cloud/pricing#storage) until the Workflow Execution |
| 182 | +completes, fails, times out, is canceled, or is terminated. |
| 183 | + |
| 184 | +## Limitations |
| 185 | + |
| 186 | +- Workflow Pause is in Pre-release and may change before Public Preview or General Availability. |
| 187 | +- Workflow Pause must be enabled before it can be used. |
| 188 | +- Workflow Pause applies to a single Workflow Execution. Bulk Workflow Pause is not supported. |
| 189 | +- Auto-pause policies are not supported. |
| 190 | +- Workflow Pause is an operational control. It isn't intended to be called from Workflow code. |
| 191 | +- There is no indicator that all in-flight Activity attempts have completed after a Workflow is Paused. |
| 192 | + |
| 193 | +## Interaction with Activity operations |
| 194 | + |
| 195 | +Workflow Pause and [Activity Operations](/activity-operations) are separate controls. |
| 196 | + |
| 197 | +Workflow Pause stops progress for a Workflow Execution. Activity Operations act on a specific Activity Execution. |
| 198 | + |
| 199 | +If a Workflow is Paused, Activity retries in that Workflow are blocked. If an individual Activity is also Paused, both |
| 200 | +the Workflow and the Activity must be Unpaused before that Activity can proceed. |
| 201 | + |
| 202 | +Workflow Pause doesn't interrupt Activity attempts that are already running. To interrupt a Heartbeating Activity |
| 203 | +attempt, use [Activity Pause](/activity-operations#pause). |
0 commit comments