# Method: projects.locations.jobs.patch

- [HTTP request](https://docs.cloud.google.com/scheduler/docs/reference/rest/v1/projects.locations.jobs/patch#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/scheduler/docs/reference/rest/v1/projects.locations.jobs/patch#body.PATH_PARAMETERS)
- [Query parameters](https://docs.cloud.google.com/scheduler/docs/reference/rest/v1/projects.locations.jobs/patch#body.QUERY_PARAMETERS)
- [Request body](https://docs.cloud.google.com/scheduler/docs/reference/rest/v1/projects.locations.jobs/patch#body.request_body)
- [Response body](https://docs.cloud.google.com/scheduler/docs/reference/rest/v1/projects.locations.jobs/patch#body.response_body)
- [Authorization scopes](https://docs.cloud.google.com/scheduler/docs/reference/rest/v1/projects.locations.jobs/patch#body.aspect)
- [Try it!](https://docs.cloud.google.com/scheduler/docs/reference/rest/v1/projects.locations.jobs/patch#try-it)

Updates a job.

If successful, the updated `https://docs.cloud.google.com/scheduler/docs/reference/rest/v1/projects.locations.jobs#Job` is returned. If the job does not exist, `NOT_FOUND` is returned.

If jobs.patch does not successfully return, it is possible for the job to be in an `https://docs.cloud.google.com/scheduler/docs/reference/rest/v1/projects.locations.jobs#State.ENUM_VALUES.UPDATE_FAILED` state. A job in this state may not be executed. If this happens, retry the jobs.patch request until a successful response is received.

### HTTP request

`PATCH https://cloudscheduler.googleapis.com/v1/{job.name=projects/*/locations/*/jobs/*}`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `job.name` | `string` Optionally caller-specified in `https://docs.cloud.google.com/scheduler/docs/reference/rest/v1/projects.locations.jobs/create#google.cloud.scheduler.v1.CloudScheduler.CreateJob`, after which it becomes output only. The job name. For example: `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`. - `PROJECT_ID` can contain letters (\[A-Za-z\]), numbers (\[0-9\]), hyphens (-), colons (:), or periods (.). For more information, see [Identifying projects](https://docs.cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) - `LOCATION_ID` is the canonical ID for the job's location. The list of available locations can be obtained by calling [locations.list](https://docs.cloud.google.com/scheduler/docs/reference/rest/v1/projects.locations/list). For more information, see [Cloud Scheduler locations](https://docs.cloud.google.com/scheduler/docs/locations). - `JOB_ID` can contain only letters (\[A-Za-z\]), numbers (\[0-9\]), hyphens (-), or underscores (_). The maximum length is 500 characters. |

### Query parameters

| Parameters ||
|---|---|
| `updateMask` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#field-mask` format)`` A mask used to specify which fields of the job are being updated. This is a comma-separated list of fully qualified names of fields. Example: `"user.displayName,photo"`. |

### Request body

The request body contains an instance of `https://docs.cloud.google.com/scheduler/docs/reference/rest/v1/projects.locations.jobs#Job`.

### Response body

If successful, the response body contains an instance of `https://docs.cloud.google.com/scheduler/docs/reference/rest/v1/projects.locations.jobs#Job`.

### Authorization scopes

Requires one of the following OAuth scopes:

- `https://www.googleapis.com/auth/cloud-platform`
- `https://www.googleapis.com/auth/cloud-scheduler`

For more information, see the [Authentication Overview](https://docs.cloud.google.com/docs/authentication#authorization-gcp).