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

# PollingTaskRunner.InterruptActiveTask

```go theme={"system"}
func (*PollingTaskRunner) InterruptActiveTask(ctx context.Context) error
```

Interrupt the active task by canceling its lease extension and reporting it as failed.

If there is no active task, the method returns nil.

## Parameters

<ParamField path="ctx" type="context.Context" required>
  The context used to report the interrupted task.
</ParamField>

## Returns

An error if the active task could not be reported as failed.

<RequestExample>
  ```go Go theme={"system"}
  if err := runner.InterruptActiveTask(ctx); err != nil {
      return err
  }
  ```
</RequestExample>
