> For the complete documentation index, see [llms.txt](https://docs.zerowork.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zerowork.io/building-blocks/logic/run-taskbot.md).

# Run TaskBot

<figure><picture><source srcset="https://3220183989-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fg9LcR8XM7TGOzOCDGsCS%2Fuploads%2Fgit-blob-61481cb4b5e984a79884583de5a16c3966e7af59%2Frun-taskbot-tile-dark.png?alt=media" media="(prefers-color-scheme: dark)"><img src="https://3220183989-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fg9LcR8XM7TGOzOCDGsCS%2Fuploads%2Fgit-blob-229233fce6266053ab8b9f13cc3a22780df3f392%2Frun-taskbot-tile.png?alt=media" alt="Run TaskBot block" width="279"></picture><figcaption></figcaption></figure>

The **Run TaskBot** block allows you to start another TaskBot from within the currently running TaskBot.

<figure><picture><source srcset="https://3220183989-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fg9LcR8XM7TGOzOCDGsCS%2Fuploads%2Fgit-blob-f8ab05d9278fbf2de649dae4f66077921b8827cf%2Frun-taskbot-settings-dark.png?alt=media" media="(prefers-color-scheme: dark)"><img src="https://3220183989-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fg9LcR8XM7TGOzOCDGsCS%2Fuploads%2Fgit-blob-3fc883c7e7f6d9d7be8d773cfcf8f0666ca73df5%2Frun-taskbot-settings.png?alt=media" alt="Run TaskBot settings" width="555"></picture><figcaption></figcaption></figure>

#### **How To Use It**

* Select the TaskBot you want to run.
* Optionally, pass values to variables in the selected TaskBot. Only the variables you specify are changed. All other variables keep their current values.
* Choose whether the current TaskBot should wait until the selected TaskBot finishes.

#### **Things To Know**

* All variable name and value fields accept [variable and table references](https://docs.zerowork.io/building-blocks/dynamic-inputs.md), as well as [expressions or code input](https://docs.zerowork.io/building-blocks/dynamic-inputs.md).
* You can select **Custom** to provide a TaskBot ID using a [variable or table reference](https://docs.zerowork.io/building-blocks/dynamic-inputs.md), [expression/code input](https://docs.zerowork.io/building-blocks/dynamic-inputs.md), or plain text instead of selecting a TaskBot from the list. This can be useful when building a TaskBot for a client or for sharing with others.
* By default, a value passed to a variable is also saved as that variable's new value in the selected TaskBot. To pass a value for this run only, turn off **Persist value** in the variable's settings inside the selected TaskBot.
* A TaskBot started by another TaskBot can itself start another TaskBot. There is no restriction to one parent-child level.

#### **Block Behavior**

* When **Wait until the TaskBot finishes** is enabled, the current TaskBot pauses until the selected TaskBot finishes. If the selected TaskBot fails or is manually stopped, an error is thrown at this block. You can use [Try-Catch](https://docs.zerowork.io/building-blocks/logic/try-catch.md) blocks to handle the error.
* When **Wait until the TaskBot finishes** is disabled, the current TaskBot continues immediately. The selected TaskBot's outcome and errors do not surface in the current TaskBot. You can view them in the selected TaskBot's run reports.
* Recursive behavior is not allowed. For example, if TaskBot A starts TaskBot B and TaskBot B attempts to start TaskBot A, an error is thrown to prevent an infinite loop.
* Manually stopping a TaskBot also stops all child TaskBots started from that run, including child TaskBots further down the chain. For example, if TaskBot A starts TaskBot B, which starts TaskBot C, manually stopping TaskBot A also stops TaskBots B and C. Manually stopping TaskBot B stops TaskBot C, but does not stop TaskBot A. This applies only to child TaskBots started with **Wait until the TaskBot finishes** enabled.
