> ## Documentation Index
> Fetch the complete documentation index at: https://docs.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 task runner.

## Parameters

<ParamField path="options" type="[]runner.Option">
  Options for initializing the task runner
</ParamField>

## Options

<ParamField path="WithClusterSlug(clusterSlug string)" default="">
  The [cluster](/workflows/concepts/clusters#managing-clusters) to connect to. If not provided, the default cluster is used.
</ParamField>

<ParamField path="WithRunnerLogger(logger *slog.Logger)" default="slog.Default()">
  Set the logger to use for the task runner
</ParamField>

<ParamField path="WithDisableMetrics()">
  Disable OpenTelemetry metrics for the task runner
</ParamField>

## Returns

The created task runner object.

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