> For the complete documentation index, see [llms.txt](https://docs.appmixer.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.appmixer.com/getting-started/loops/delayed-loop.md).

# Delayed Loop

Send the items of a list one after another with a pause between them, for example to stay under an API rate limit.

## Introduction

By default the [Each](/getting-started/loops.md) component sends all the items of a list at once. The steps in the loop body then call the target API for all the items at the same time, which can hit its rate limit.

Set **Delay** on Each to space the items out. Each then sends one item, waits the given number of milliseconds, sends the next one, and so on.

![Each with a delay of 500 ms between items](https://4113719406-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzU8KYStPfR8N1iZXsgad%2Fuploads%2Fgit-blob-73fc0eac27a7d4e38c8b09edea1cb1bd579794d2%2Floops-each-inspector-delay.png?alt=media)

## Settings

* **Delay**: the pause between two items in milliseconds, from 0 to 60000 (one minute). 0 or empty means no delay.

For example, an API that allows 10 requests per second needs a delay of at least 100 ms.

## How it works

* Each sends the items in their list order, with the pause between them. The **item** messages look the same as in the default mode: **Index**, **Value**, **Items Count** and **Correlation ID**.
* **done** is sent once the last item has been sent.
* A long list is processed in batches of up to three minutes in the background, so a delayed loop can run for a long time without blocking the flow. If the engine delivers the input message again after an error, the loop continues from the last sent item instead of starting over.
* Join Each works the same as in a parallel loop, see [Parallel loop with Join Each](/getting-started/loops.md#parallel-loop-with-join-each).

{% hint style="warning" %}
A delay controls when an item is **sent**, not when it is **finished**. If one item takes longer in the loop body than the delay, the next item starts before the previous one is done, and the items can still finish out of order. When every item has to be finished before the next one starts, use a [sequential loop](/getting-started/loops/sequential-loop.md).
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.appmixer.com/getting-started/loops/delayed-loop.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
