# Wait

> Pauses the run for a while, or until a date.

Source: https://docs.go-lumen.ai/reference/nodes/wait

## At a glance

| Property | Value |
| --- | --- |
| **Node field** | `wait` (set instead of `stepRef` on a FlowNode) |
| **Side effects** | no |

A FlowNode sets exactly one of `stepRef`, `branch`, `filter`, `forEach`, `wait` and `approval`.

## Settings

The value of the node field, with these settings.

| Setting | Type | Default | Description |
| --- | --- | --- | --- |
| `for` | string |  | For is how long to wait, e.g. 30m or 48h. (pattern \`^(\[0-9\]+(\\.\[0-9\]+)?(ns|us|µs|ms|s|m|h))+$\`) |
| `until` | string |  | Until is an RFC 3339 time, or a <nodeId>.<field> reference to an upstream date field. |

The full JSON Schema of these settings: [wait.schema.json](https://docs.go-lumen.ai/schemas/nodes/wait.schema.json).

## Use it in a flow

```yaml title="flow.yaml"
apiVersion: lumen.ai/v1alpha1
kind: Connector
metadata:
  name: my-email-forward
  namespace: tenant-acme
spec:
  classRef: {name: email-forward}
  config: {}
---
apiVersion: lumen.ai/v1alpha1
kind: Flow
metadata:
  name: wait-example
  namespace: tenant-acme
spec:
  displayName: "Wait"
  triggers:
    - id: start
      ref: {name: email-arrives}
      connectorRef: {name: my-email-forward}
      next: [text]
  nodes:
    - id: text
      stepRef: {name: read-text}
      next: [pause]
    - id: pause
      wait: {for: 48h}
      next: [remind]
    - id: remind
      stepRef: {name: notify-in-app}
      config:
        to: admins
        title: Two days passed
        body: Has the invoice been paid?
```
