> For the complete documentation index, see [llms.txt](https://docs.robpod.cloud/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.robpod.cloud/advanced-scripting/background-task.md).

# Background Task

#### Purpose

The purpose of the Background Task is to provide continuous monitoring and control logic on the robot controller, independently of the main robot program, without requiring a separate physical PLC.

<figure><img src="https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FLfWZRidun3NvliFEGJwe%2FImmagine5.png?alt=media&amp;token=822d93b7-25fb-46fb-b158-a833c3bc554d" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Background Task is available starting from Robpod Studio 1.3.6 release.
{% endhint %}

#### Overview

A **Background Task** runs in parallel with the main robot program on the robot controller. Its key feature is that it continues running even when the main robot program is stopped. This allows permanent background logic and monitoring functions to be implemented without requiring additional PLC hardware.

The Background Task is implemented as a standard Python program. To interact with the robot, it uses the **Robpod Background API**, which provides functions for:

* Reading the robot's state: safety status, joint and caretesian position, operational mode, program state.
* Reading and writing Digital and Analog I/O signals.
* Reading and writing Modbus register.
* Scheduling logic rules.

{% hint style="info" %}
Motion commands are not supported in the Background Task, as only the main robot program is allow to control the robot motion.
{% endhint %}

The Background Task can also be configured to start automatically when the robot controller starts up, ensuring that background logic and monitoring functions are available without manual intervention.

{% hint style="warning" %}
**Safety Notice**

The Background Task is not a safety-rated program and must not be used to implement safety-related functions or logic requiring certification. All safety-critical functions must be implemented using appropriate certified safety devices.
{% endhint %}

To leran how to develop and setup a Background Task, follow this guides:

* [Create and Setup a Background Task](https://docs.robpod.cloud/advanced-scripting/background-task/setup.md)
* [Learn the Background API by Examples](https://docs.robpod.cloud/advanced-scripting/background-task/learn-by-examples.md)
* [Background Library API Docs](https://www.robpod.cloud/docs/background.html)
