> ## 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.

# Client.NewTaskRunner

```go theme={"system"}
func (*Client) NewTaskRunner(
  ctx context.Context,
  options ...runner.Option,
) (*workflows.TaskRunner, error)
```

Initialize a runner.

## Parameters

**options** `[]runner.Option`

Options for initializing the runner

## Options

**runner.WithClusterSlug(clusterSlug string)**

The [cluster](https://docs-old.tilebox.com/workflows/concepts/clusters.md#managing-clusters) to connect to. If not provided, the default cluster is used.

\**runner.WithRunnerLogger(logger *slog.Logger)** (default: slog.Default())

Set the logger to use for the runner

**runner.WithDisableMetrics()**

Disable OpenTelemetry metrics for the runner

## Returns

The created runner object.

```go Go theme={"system"}
runner, err := client.NewTaskRunner(ctx)
```


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