# Sleep Action

The **Sleep Action** node pauses the execution of a stream for a defined amount of time.

During this period, the workflow does not continue processing the next node. The delay is specified in milliseconds and is executed on the host running the stream (client or server).

#### Input Parameters

**Milliseconds**\
Amount of time the stream should wait before continuing execution.\
(Example: `1000` = 1 second)

<figure><img src="/files/zn1hdqVF0MQUDw25cKwc" alt="" width="352"><figcaption><p>Sleep Action</p></figcaption></figure>

#### Behavior

* Temporarily stops the workflow
* After the delay, the stream continues normally
* Supports asynchronous execution

#### Why This Node Is Needed

Some external systems or background processes do not respond immediately.\
A node may successfully send a request (for example via an API or script) but the remote system may still be processing the task.

If the next node depends on the result of that operation, the workflow may continue too early and fail because the external system has not finished yet.

The Sleep Action introduces a controlled waiting period to allow the external process to complete.

#### Typical Use Cases

* waiting for third-party APIs to finish processing
* allowing file systems or network shares to update
* waiting for files to appear after transfer
* spacing multiple API calls
* stabilizing workflows that depend on background processes

#### Example Scenario

A stream sends a request to an external system via a JavaScript/API node.\
The system accepts the request but processes it asynchronously and does not return a final result immediately.

A following node tries to read data or send a second request.\
Without waiting, the first operation may still be running and the next step fails.

Placing a **Sleep Action** between the two nodes gives the external system time to finish before the workflow continues.

#### Practical Tip

Use short delays first and increase only if necessary.\
Very long sleep times are usually a sign that the workflow should instead poll for a condition (e.g., checking if a file exists) rather than waiting blindly.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.helmut.de/helmut4-releases/helmut4-components/streamdesigner/nodes/actions/misc-21/sleep-action.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
