# Concurrency Controls

Sometimes, you want to run multiple tasks but you don't want them all to run at once. Instead of starting them one by one, Lyra offers a feature called Concurrency Controls.&#x20;

With concurrency controls you can control how many tasks run at once, and the delay in between those tasks running.

<figure><img src="/files/UoKOJid58aGzuVDbwSEt" alt=""><figcaption></figcaption></figure>

**Concurrent tasks:** The maximum amount of tasks that can run at once. 0 means all tasks can run at once.

**Concurrency delay:** The amount of time that the bot has to wait once the bot can start a new task. (in seconds)

{% hint style="info" %}
Note: You can input a single number <mark style="color:blue;">**5**</mark> to use static delay or you can input a range and Lyra will use a random delay inside that range [<mark style="color:blue;">5-10</mark>](#user-content-fn-1)[^1].
{% endhint %}

<figure><img src="/files/28y8MhMGfQ1HISrQtTk1" alt=""><figcaption><p>Example of concurrency controls in action.</p></figcaption></figure>

[^1]: ![](/files/3Hx9cHidJ6oDK17F3nQT)


---

# 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://desktop-guide.lyrarobotics.io/basics/concurrency-controls.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.
