---
title: "Runner.register"
description: "Register a task class with a reusable runner definition."
image: "https://tilebox.com/images/tilebox-docs-social-preview.png"
---

> Documentation Index
> Fetch the complete documentation index at: https://tilebox.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Runner.register

import { Fragment } from "astro/jsx-runtime";

import ApiReference from "@docs/components/ApiReference.astro";

import ParamField from "@docs/components/ParamField.astro";

```python
def Runner.register(task: type[Task]) -> None
```

Register a task class with a reusable runner definition.

Use `register` when you want to build a runner incrementally instead of passing all task classes to the [`Runner`](/docs/api-reference/python/tilebox.workflows/Runner) constructor.

## Parameters

**task**

type: type[Task]

required: true

Task class that this runner can execute.

## Returns

`None`

<h2 id="request-example">Usage example</h2>

```python
from tilebox.workflows import Runner

from my_workflow.tasks import (
    MyRootTask,
    MySubtask,
)

runner = Runner()
runner.register(MyRootTask)
runner.register(MySubtask)
```

Source: https://tilebox.com/docs/api-reference/python/tilebox.workflows/Runner.register/index.mdx
