---
title: "JobClient.cancel"
description: "Cancel a job without interrupting tasks that are already running."
image: "https://tilebox.com/images/tilebox-docs-social-preview.png"
---

> Documentation Index
> Fetch the complete documentation index at: https://tilebox.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# JobClient.cancel

import { Fragment } from "astro/jsx-runtime";

import ApiReference from "@docs/components/ApiReference.astro";

import ParamField from "@docs/components/ParamField.astro";

```python
def JobClient.cancel(job_or_id: Job | str)
```

Cancel a job. When a job is canceled, no queued tasks will be picked up by runners and executed even if 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 runners.

## Parameters

**job_or_id**

type: Job | str

The job or job id to cancel.

<h2 id="request-example">Usage example</h2>

```python
job_client.cancel(job)
```

Source: https://tilebox.com/docs/api-reference/python/tilebox.workflows/JobClient.cancel/index.mdx
