# Delay

> Pauses the run for some minutes, hours or days, or until a date and time, and then goes on.

Source: https://docs.go-lumen.ai/de/reference/steps/delay

## Auf einen Blick

| Eigenschaft | Wert |
| --- | --- |
| **Schrittname** | `delay` |
| **Ressource** | ClusterStep (`lumen.ai/v1alpha1`) |
| **Palettengruppe, Kategorie** | control, logic |
| **Credits** | **0** Credits bei jedem Erfolg |
| **Externe Wirkung** | nein |
| **Die Installation muss bereitstellen** | nichts |

## Eingaben

| Eigenschaft | Wert |
| --- | --- |
| **Braucht** | nichts |
| **Liefert** | nichts |
| **Arbeitet auf** | item: einem Dokument nach dem anderen |

Braucht und Liefert sind Datentypen (file, text, fields, email). Der Editor bietet einen Schritt nur dort an, wo das, was er braucht, schon auf dem Pfad liegt. Siehe [Dokumente und Daten](https://docs.go-lumen.ai/de/concepts/how-flows-run.md#documents-and-data).

## Ausgaben

Keine benannten Ausgaben. Spätere Knoten sehen weiterhin alles, was auf dem Pfad zuvor entstanden ist, und dieser Schritt reicht die Dokumente unverändert weiter.

## Einstellungen

Wird unter `config:` im Knoten des Flows gesetzt. Texteinstellungen dürfen Platzhalter wie `{nodeId.field}` enthalten.

| Einstellung | Typ | Standardwert | Beschreibung |
| --- | --- | --- | --- |
| `mode` | string | `"for"` | Mode is for (an amount of time, the default) or until (a moment). (one of for, until) |
| `amount` | integer |  | Amount and Unit are how long, for Mode for. (minimum 1; maximum 129600) |
| `unit` | string | `"minutes"` | Unit (one of minutes, hours, days) |
| `until` | string |  | Until is the moment to go on at, an RFC 3339 time or a date (the start of that day, UTC), for Mode until. A moment already past does not wait. (maxLength 64) |

Das vollständige JSON Schema dieser Einstellungen: [delay.schema.json](https://docs.go-lumen.ai/schemas/steps/delay.schema.json).

## Beispiel

```yaml title="config"
amount: 2
mode: for
unit: hours
```

## Im Flow verwenden

Ein Knoten, der `delay` ausführt, steht unter `spec.nodes` eines [Flow](https://docs.go-lumen.ai/de/concepts/how-flows-run.md#the-flow-as-yaml). Geben Sie ihm eine beliebige id und nennen Sie in next die ids der nächsten Knoten.

```yaml title="flow.yaml"
apiVersion: lumen.ai/v1alpha1
kind: Flow
metadata:
  name: delay-example
  namespace: tenant-acme
spec:
  displayName: "Delay"
  triggers:
    - id: start
      ref: {name: manual-run}
      next: [delay]
  nodes:
    - id: delay
      stepRef: {name: delay}
      config:
        amount: 2
        mode: for
        unit: hours
```
