---
title: "Creates a Task to the specified Job."
method: POST
path: "/jobs/{jobId}/tasks"
tags: ["Tasks"]
---

# Creates a Task to the specified Job.

`POST /jobs/{jobId}/tasks`

The maximum lifetime of a Task from addition to completion is 180 days. If a
Task has not completed within 180 days of being added it will be terminated by
the Batch service and left in whatever state it was in at that time.

## Path parameters

- `jobId` 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

## Response `201`

The request has succeeded and a new resource has been created as a result.

## 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/versions/8427acd8fd77/schema)
