---
title: "TaskRunner.RunAll"
description: "Run the runner until there are no more tasks available."
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.

# TaskRunner.RunAll

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

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

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

```go
func (*TaskRunner) RunAll(ctx context.Context) error
```

Run the runner until there are no more tasks available.

Use `RunAll` for finite worker processes and local draining workflows. Use [`RunForever`](/docs/api-reference/go/workflows/TaskRunner.RunForever) for long-running runners.

## Parameters

**ctx**

type: context.Context

required: true

The context controlling the runner lifetime.

## Returns

An error if the polling loop fails.

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

```go
if err := runner.RunAll(ctx); err != nil {
    return err
}
```

Source: https://tilebox.com/docs/api-reference/go/workflows/TaskRunner.RunAll/index.mdx
