> 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

Pause pipeline execution for a set duration using the Wait step

Use the Wait step to pause a pipeline execution for a set duration. For example, pause while you check that a Kubernetes cluster has the necessary resources, or that a database schema has been updated. 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 fails the execution.

***

## What you will learn from this topic

* How to [add the Wait step](#add-the-wait-step) to a pipeline stage
* How to configure [Duration](#duration) with fixed values, runtime inputs, or expressions
* How to [mark the Wait step as success or failed](#mark-the-wait-step-as-success-or-failed) during execution
* How Wait step behavior interacts with [failure strategies](#mark-the-wait-step-as-success-or-failed) and active executions

***

## Before you begin

* **Pipeline edit access**: Permission to edit the pipeline where you add the Wait step. Go to [RBAC in Harness](https://developer.harness.io/docs/platform/role-based-access-control/rbac-in-harness) to configure roles.
* **Failure strategy familiarity (optional)**: Go to [Step and stage failure strategy references](/continuous-delivery/use-continuous-delivery/cd-building-blocks/executions/step-failure-strategy-settings.md) to review failure strategy options used with **Mark as Failed**.

***

## Add the Wait step

The Wait step is available in approval, custom, Continuous Delivery, and feature flag stages. You can add the Wait step anywhere in those stages.

Perform the following steps to add a Wait step:

1. In your stage **Execution** (or **Rollout Strategy** in feature flag stages), select **Add Step**, then select **Wait**.
2. Enter a name for the step.
3. In **Duration**, enter how long the Wait step should run. After the timeout occurs, the pipeline execution proceeds. When the Wait step runs, the duration is displayed in its **Details**.

   ![](https://3694223630-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fy1JhZ4oKIppwY7d5AhPj%2Fuploads%2Fgit-blob-2a4ee89163d3e664219b44ccd0873c389912988f%2Fwait-step-27.png?alt=media)
4. Select **Apply Changes**.

### Duration

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.

Go to [Fixed values, runtime inputs, and expressions](https://developer.harness.io/docs/platform/variables-and-expressions/runtime-inputs) to configure these input types.

***

## Mark the Wait step as success or failed

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.

![](https://3694223630-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fy1JhZ4oKIppwY7d5AhPj%2Fuploads%2Fgit-blob-df08db9faf99cf69ddbb25c2055e06963030dab7%2Fwait-step-28.png?alt=media)

Go to [Define a failure strategy on stages and steps](https://developer.harness.io/docs/platform/pipelines/failure-handling/define-a-failure-strategy-on-stages-and-steps) for Platform failure strategy details, or go to [Step and stage failure strategy references](/continuous-delivery/use-continuous-delivery/cd-building-blocks/executions/step-failure-strategy-settings.md) for Continuous Delivery references.

For example, if a Wait step has the failure strategy **Manual Intervention**, when you select **Mark as Failed**, you are prompted with the **Manual Intervention** options:

![](https://3694223630-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fy1JhZ4oKIppwY7d5AhPj%2Fuploads%2Fgit-blob-bd912590005c34ed5ed9ab576d84fb7716064678%2Fwait-step-29.png?alt=media)

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

***

## Important notes

Keep the following constraints in mind when you use the Wait step:

* The Wait step is available in approval, custom, Continuous Delivery, 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.

***

## Frequently asked questions

<details>

<summary>What pipeline statuses count toward concurrent active pipeline executions?</summary>

Concurrent active pipeline executions include active and in-progress executions. This includes pipelines that are paused temporarily by steps such as the Wait step or an approval step.

</details>

<details>

<summary>Is there a way to see which user marks the Wait step as success or failed?</summary>

Use a Harness Approval step in addition to the Wait step for audited user action, and set a failure strategy if the wait times out. Go to [Using Harness Approval steps in Continuous Delivery stages](/continuous-delivery/use-continuous-delivery/cd-building-blocks/cd-steps/approvals/using-harness-approval-steps-in-cd-stages.md#add-an-approval-step-in-a-cd-stage) to add an approval step.

</details>

<details>

<summary>Can you remove the Mark as Success and Mark as Failed actions from the Wait step?</summary>

No. You cannot remove the permissible actions from the Wait step. The Wait step provides **Mark as Success** and **Mark as Failed**, which are required for the step to proceed with the pipeline execution.

You can set a failure strategy for the Wait step so the pipeline fails if the step is marked as failed. You can also set a longer timeout duration to enforce a mandatory waiting time.

</details>

***

## Next steps

* [Step and stage failure strategy references](/continuous-delivery/use-continuous-delivery/cd-building-blocks/executions/step-failure-strategy-settings.md): Configure what happens when **Mark as Failed** is selected.
* [Using Harness Approval steps in Continuous Delivery stages](/continuous-delivery/use-continuous-delivery/cd-building-blocks/cd-steps/approvals/using-harness-approval-steps-in-cd-stages.md): Add audited approvals alongside waits.
* [Fixed values, runtime inputs, and expressions](https://developer.harness.io/docs/platform/variables-and-expressions/runtime-inputs): Set Wait **Duration** dynamically.

{% @harness-feedback/feedback %}
