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

```go theme={"system"}
func (*Client) NewPollingTaskRunner(
    ctx context.Context,
    executor workflows.TaskExecutor,
    options ...runner.Option,
) (*workflows.PollingTaskRunner, error)
```

Create a polling runner for a custom task executor.

Use this lower-level runner when you need a custom execution backend, such as a dynamic runtime, but still want the Tilebox polling protocol to request, lease, and report tasks.

## Parameters

<ParamField path="executor" type="workflows.TaskExecutor" required>
  The executor that reports task capabilities and executes leased tasks.
</ParamField>

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

## Options

<ParamField path="runner.WithClusterSlug(clusterSlug string)" default="">
  The cluster to poll for tasks. If not provided, the default cluster is used.
</ParamField>

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

## Returns

The created polling runner.

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