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

# TaskRunner.RunAll

```go theme={"system"}
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`](https://docs-old.tilebox.com/api-reference/go/workflows/TaskRunner.RunForever) for long-running runners.

## Parameters

**ctx** `context.Context` *required*

The context controlling the runner lifetime.

## Returns

An error if the polling loop fails.

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


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.