> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify-poc.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# delete_job()

> Delete a job from the automatic scheduler

export const JOB = 'job';

export const JOB_CAP = 'Job';

<Icon icon="tag" iconType="duotone" /> Community <Icon icon="tag" iconType="duotone" /> Since [1.2.0][tsdb-1.2.0]

Delete a {JOB} registered with the automation framework.
This works for {JOB}s as well as policies.

If the {JOB} is currently running, the process is terminated.

## Samples

Delete the {JOB} with the {JOB} id 1000:

```sql theme={"dark"}
SELECT delete_job(1000);
```

## Arguments

The syntax is:

```sql theme={"dark"}
SELECT delete_job(
    job_id = <job_id>
);
```

| Name     | Type    | Default | Required | Description                     |
| -------- | ------- | ------- | -------- | ------------------------------- |
| `job_id` | INTEGER | -       | ✔        | TimescaleDB background {JOB} id |

## Returns

This function returns void.

[tsdb-1.2.0]: https://github.com/timescale/timescaledb/releases/tag/1.2.0
