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

# JobClient.cancel

```python theme={"system"}
def JobClient.cancel(job_or_id: Job | str)
```

Cancel a job. When a job is canceled, no queued tasks will be picked up by task runners and executed even if task runners are idle. Tasks that are already being executed will finish their execution and not be interrupted. All sub-tasks spawned from such tasks after the cancellation will not be picked up by task runners.

## Parameters

<ParamField path="job_or_id" type="Job | str">
  The job or job id to cancel.
</ParamField>

<RequestExample>
  ```python Python theme={"system"}
  job_client.cancel(job)
  ```
</RequestExample>
