---
title: "Jobs.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.

# Jobs.Cancel

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

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

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

```go
func (*JobClient) Cancel(ctx context.Context, jobID uuid.UUID) error
```

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

**jobID**

type: uuid.UUID

The id of the job

## Returns

An error if the job could not be cancelled.

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

```go
err := client.Jobs.Cancel(ctx,
    uuid.MustParse("0195c87a-49f6-5ffa-e3cb-92215d057ea6"),
)
```

Source: https://tilebox.com/docs/api-reference/go/workflows/Jobs.Cancel/index.mdx
