---
title: "Deletes a Task from the specified Job."
method: DELETE
path: "/jobs/{jobId}/tasks/{taskId}"
tags: ["Tasks"]
---

# Deletes a Task from the specified Job.

`DELETE /jobs/{jobId}/tasks/{taskId}`

When a Task is deleted, all of the files in its directory on the Compute Node
where it ran are also deleted (regardless of the retention time). For
multi-instance Tasks, the delete Task operation applies synchronously to the
primary task; subtasks and their files are then deleted asynchronously in the
background.

## Path parameters

- `jobId` string, required
- `taskId` string, required

## Query parameters

- `api-version` string, required
- `timeOut` integer

## Headers

- `client-request-id` string
- `return-client-request-id` boolean
- `ocp-date` string, date-time-rfc7231
- `If-Modified-Since` string, date-time-rfc7231
- `If-Unmodified-Since` string, date-time-rfc7231
- `If-Match` string
- `If-None-Match` string

## Response `200`

The request has succeeded.

## Other responses

- `default` — An unexpected error response.

---

[API](https://skmtc.net/azure/apis/batch-batch.md) · [All operations](https://skmtc.net/azure/apis/batch-batch/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/azure/batch-batch/revisions/8427acd8fd77/schema)
