> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/continuous-delivery/use-continuous-delivery/cd-building-blocks/cd-steps/utilities/wait-step.md).

# Wait step

This topic describes how to use the Wait step included in Harness pipeline stages.

Imagine you want to automatically pause and hold a pipeline execution while you check third party systems, such as checking to ensure that a Kubernetes cluster has the necessary resources, or that a database schema has been updated.

Harness pipelines include the Wait step so you can pause the pipeline execution for any amount of time. After the wait time expires, the pipeline execution proceeds.

When the Wait step is running, it provides **Mark as Success** and **Mark as Failed** options. **Mark as Success** ends the wait period and proceeds with the execution. **Mark as Failed** initiates the Failure Strategy for the step or stage, if any, or simply fails the execution.

### Add the Wait step <a href="#add-the-wait-step" id="add-the-wait-step"></a>

The Wait step is available in approval, custom, CD, and feature Flag stages. You can add the Wait step anywhere in those stages.

1. In your stage **Execution** (or **Rollout Strategy** in Feature Flags), select **Add Step**, and then select **Wait**.
2. Enter a name for the step.
3. In **Duration**, enter how long the Wait step should run. Once the timeout occurs, the pipeline execution proceeds.\
   When the Wait step runs, the duration is displayed in its **Details**.\
   ![](/files/Sol1K1CzGflA663zjJRm)
4. Select **Apply Changes**.

#### Duration <a href="#duration" id="duration"></a>

The allowed values for **Duration** are:

* `w` for weeks
* `d` for days
* `h` for hours
* `m` for minutes
* `s` for seconds
* `ms` for milliseconds

The maximum is `53w`.

You can use a fixed value, runtime input, or expression for **Duration**.

If you use runtime input, you can enter the wait time when you run the pipeline. You can also set it in a trigger.

If you use an expression, ensure that the expression resolves to one of the allowed time values.

For information, go to [fixed values, runtime inputs, and expressions](/harness-ai/use-harness-platform/variables-and-expressions/runtime-inputs.md).

### Marking the Wait step as success or fail <a href="#marking-the-wait-step-as-success-or-fail" id="marking-the-wait-step-as-success-or-fail"></a>

When the Wait step is running, it provides **Mark as Success** and **Mark as Failed** options. **Mark as Success** ends the wait period and proceeds with the execution. **Mark as Failed** initiates the failure strategy for the step or stage.

![](/files/c7xwnRXhGiTOA5Drdpk4)

For information on failure strategies, go to [define a failure strategy on stages and steps](/harness-ai/use-harness-platform/pipelines/failure-handling/define-a-failure-strategy-on-stages-and-steps.md).

For example, let's say a Wait step has the failure strategy **Manual Intervention**. When the user selects **Mark as Failed**, they are prompted with the **Manual Intervention** options:

![](/files/O5HGwuZZIeFYyv9hJWWc)

If no failure strategy is set at the step or stage level, then selecting **Mark as Failed** simply fails the pipeline execution at the Wait step.

### Important notes <a href="#important-notes" id="important-notes"></a>

* The Wait step is available in approval, custom, CD, and feature flag stages.
* The Wait step does not use a Harness Delegate. It is run by the Harness platform. There is no **Delegate Selector** in the Wait step's **Advanced** settings.

### General Wait step FAQs <a href="#general-wait-step-faqs" id="general-wait-step-faqs"></a>

#### What pipeline statuses are considered when determining concurrent active pipeline executions ? <a href="#what-pipeline-statuses-are-considered-when-determining-concurrent-active-pipeline-executions" id="what-pipeline-statuses-are-considered-when-determining-concurrent-active-pipeline-executions"></a>

Concurrent active pipeline executions comprises of active and in-progress executions. This includes those that are paused temporarily by steps such as the Wait step or approval step. Currently there are plans to exclude pipelines that are waiting for approval.

#### Is there a way to see which user acts on the Wait step to mark it as a success or mark it as fail? <a href="#is-there-a-way-to-see-which-user-acts-on-the-wait-step-to-mark-it-as-a-success-or-mark-it-as-fail" id="is-there-a-way-to-see-which-user-acts-on-the-wait-step-to-mark-it-as-a-success-or-mark-it-as-fail"></a>

One can look at having Harness approval step in addition to Wait step for this use case, also can set a failure strategy in case it timeout Please read more on Harness approval step in the following [Documentation](/continuous-delivery/use-continuous-delivery/cd-building-blocks/cd-steps/approvals/using-harness-approval-steps-in-cd-stages.md#add-approval-step).

#### Is it possible to remove permissible actions from the Wait Step? <a href="#is-it-possible-to-remove-permissible-actions-from-the-wait-step" id="is-it-possible-to-remove-permissible-actions-from-the-wait-step"></a>

No, removing the permissible actions from the Wait Step is not possible. The Wait Step provides the options to Mark as Success and Mark as Failed, which are necessary for the step to proceed with the pipeline execution.

However, you can set a failure strategy for the Wait Step to ensure that the pipeline execution fails if the step is marked as failed. Additionally, you can set a longer timeout duration to ensure that the mandatory waiting time is enforced.
