gcloud beta scheduler jobs update http

NAME
gcloud beta scheduler jobs update http - update a Cloud Scheduler job that triggers an action via HTTP
SYNOPSIS
gcloud beta scheduler jobs update http(JOB :--location=LOCATION)[--attempt-deadline=ATTEMPT_DEADLINE][--description=DESCRIPTION][--http-method=HTTP_METHOD; default="post"][--schedule=SCHEDULE][--uri=URI][--clear-auth-token    | [--oauth-service-account-email=OAUTH_SERVICE_ACCOUNT_EMAIL :--oauth-token-scope=OAUTH_TOKEN_SCOPE]    | [--oidc-service-account-email=OIDC_SERVICE_ACCOUNT_EMAIL :--oidc-token-audience=OIDC_TOKEN_AUDIENCE]][--clear-headers    |--remove-headers=[REMOVE_HEADERS,…]--update-headers=[KEY=VALUE,…]][--clear-max-backoff    |--max-backoff=MAX_BACKOFF; default="3600s"][--clear-max-doublings    |--max-doublings=MAX_DOUBLINGS; default=5][--clear-max-retry-attempts    |--max-retry-attempts=MAX_RETRY_ATTEMPTS][--clear-max-retry-duration    |--max-retry-duration=MAX_RETRY_DURATION][--clear-message-body    |--message-body=MESSAGE_BODY    |--message-body-from-file=PATH_TO_FILE][--clear-min-backoff    |--min-backoff=MIN_BACKOFF; default="5s"][--clear-time-zone    |--time-zone=TIME_ZONE; default="Etc/UTC"][GCLOUD_WIDE_FLAG]
DESCRIPTION
(BETA) Update a Cloud Scheduler job that triggers an action viaHTTP.
EXAMPLES
Update my-job's retry attempt limit:
gcloudbetaschedulerjobsupdatehttpmy-job--max-retry-attempts=2
POSITIONAL ARGUMENTS
Job resource - Job to update. The arguments in this group can be used to specifythe attributes of this resource. (NOTE) Some attributes are not given argumentsin this group but can be set in other ways.

To set theproject attribute:

  • provide the argumentjob on the command line with a fully specifiedname;
  • provide the argument--project on the command line;
  • set the propertycore/project.

This must be specified.

JOB
ID of the job or fully qualified identifier for the job.

To set thejob attribute:

  • provide the argumentjob on the command line.

This positional argument must be specified if any of the other arguments in thisgroup are specified.

--location=LOCATION
The location of the job. By default, uses the location of the current project'sApp Engine app if there is an associated app.To set thelocation attribute:
  • provide the argumentjob on the command line with a fully specifiedname;
  • provide the argument--location on the command line;
  • defaults to App Engine's app location if not provided & an app exists.
FLAGS
--attempt-deadline=ATTEMPT_DEADLINE
The deadline for job attempts. If the request handler doesn't respond by thisdealine, the request is cancelled and the attempt is marked as failed. Forexample, 20s.
--description=DESCRIPTION
Human-readable description of the job.
--http-method=HTTP_METHOD; default="post"
HTTP method to use for the request.HTTP_METHOD must beone of:delete,get,head,post,put.
--schedule=SCHEDULE
Schedule on which the job will be executed.

As a general rule, executionn + 1 of a job will not begin untilexecutionn has finished. Cloud Scheduler will never allow twosimultaneously outstanding executions. For example, this implies that if then+1 execution is scheduled to run at16:00 but then execution takes until16:15, then+1execution will not start until16:15. A scheduled start time willbe delayed if the previous execution has not ended when its scheduled timeoccurs. Learn more about thecronjob format.

If--retry-count > 0 and a job attempt fails, the job will betried a total of--retry-count times, with exponential backoff,until the job succeeds or the number of retries is exhausted. Note that the nextscheduled execution time might be skipped if the retries continue through thattime. For more information, seeRetryjobs.

--uri=URI
The full URI path that the request will be sent to. This string must begin witheither "http://" or "https://". For example,http://acme.com orhttps://acme.com/sales:8080. Cloud Scheduler will encode somecharacters for safety and compatibility. The maximum allowed URL length is 2083characters after encoding.
How the request sent to the target when executing the job should beauthenticated.At most one of these can be specified:
--clear-auth-token
Clear the auth token fields:--oidc-service-account-email,--oidc-token-audience,--oauth-service-account-email,and--oauth-token-scope.
OAuth2
--oauth-service-account-email=OAUTH_SERVICE_ACCOUNT_EMAIL
The service account email to be used for generating an OAuth2 access token to beincluded in the request sent to the target when executing the job. The serviceaccount must be within the same project as the job. The caller must haveiam.serviceAccounts.actAs permission for the service account. The token must beOAuth if the target is a Google APIs service with URL*.googleapis.com.

This flag argument must be specified if any of the other arguments in this groupare specified.

--oauth-token-scope=OAUTH_TOKEN_SCOPE
The scope to be used when generating an OAuth2 access token to be included inthe request sent to the target when executing the job. If not specified,"https://www.googleapis.com/auth/cloud-platform" will be used.
OpenId Connect
--oidc-service-account-email=OIDC_SERVICE_ACCOUNT_EMAIL
The service account email to be used for generating an OpenId Connect token tobe included in the request sent to the target when executing the job. Theservice account must be within the same project as the job. The caller must haveiam.serviceAccounts.actAs permission for the service account. The OIDC token isgenerally usedexcept for Google APIs hosted on*.googleapis.com: these APIs expect an OAuth token.

This flag argument must be specified if any of the other arguments in this groupare specified.

--oidc-token-audience=OIDC_TOKEN_AUDIENCE
The audience to be used when generating an OpenId Connect token to be includedin the request sent to the target when executing the job. If not specified, theURI specified in target will be used.
At most one of these can be specified:
--clear-headers
Clear the list of HTTP headers.
--remove-headers=[REMOVE_HEADERS,…]
KEY1,KEY2 list of HTTP headers to remove from the request.--remove-headers Accept-Language,Accept
--update-headers=[KEY=VALUE,…]
KEY=VALUE pairs of HTTP headers to include in the request.Cannot berepeated. For example:--update-headersAccept-Language=en-us,Accept=text/plain
At most one of these can be specified:
--clear-max-backoff
Clear the field corresponding to--max-backoff.
--max-backoff=MAX_BACKOFF; default="3600s"
Maximum amount of time to wait before retrying a job after it fails. Forexample,60s. Default is3600s (1 hour).
At most one of these can be specified:
--clear-max-doublings
Clear the field corresponding to--max-doublings.
--max-doublings=MAX_DOUBLINGS; default=5
Maximum number of times that the interval between failed job retries will bedoubled before the increase becomes constant.
At most one of these can be specified:
--clear-max-retry-attempts
Clear the field corresponding to--max-retry-attempts.
--max-retry-attempts=MAX_RETRY_ATTEMPTS
Number of times to retry the request if it fails or times out. Must be in range0-5 inclusive. Default is 0.
At most one of these can be specified:
--clear-max-retry-duration
Clear the field corresponding to--max-retry-duration.
--max-retry-duration=MAX_RETRY_DURATION
Time limit for retrying a failed job, measured from when the job was first run.If specified with--max-retry-attempts greater than 0, the job willbe retried until both limits are reached. Default is 0 seconds (which meansunlimited); however, if--max-retry-attempts is also 0, a jobattempt won't be retried if it fails.
At most one of these can be specified:
--clear-message-body
Clear the field corresponding to--message-body or--message-body-from-file.
--message-body=MESSAGE_BODY
Data payload to be included as the body of the HTTP request. May only be givenwith compatible HTTP methods (PUT or POST).
--message-body-from-file=PATH_TO_FILE
Path to file containing the data payload to be included as the body of the HTTPrequest. May only be given with compatible HTTP methods (PUT or POST). Use afull or relative path to a local file containing the value of message_body.
At most one of these can be specified:
--clear-min-backoff
Clear the field corresponding to--min-backoff.
--min-backoff=MIN_BACKOFF; default="5s"
Minimum amount of time to wait before retrying a job after it fails. Forexample,10s. Default is5s.
At most one of these can be specified:
--clear-time-zone
Clear the field corresponding to--time-zone.
--time-zone=TIME_ZONE; default="Etc/UTC"
Specifies the time zone to be used in interpreting --schedule. The value of thisfield must be a time zone name from the tz database(https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).

Note that some time zones include a provision for daylight savings time. Therules for daylight saving time are determined by the chosen time zone.

For UTC use the string "utc". Default is "utc".

GCLOUD WIDE FLAGS
These flags are available to all commands:--access-token-file,--account,--billing-project,--configuration,--flags-file,--flatten,--format,--help,--impersonate-service-account,--log-http,--project,--quiet,--trace-token,--user-output-enabled,--verbosity.

Run$gcloud help for details.

API REFERENCE
This command uses thecloudscheduler/v1 API. The full documentationfor this API can be found at:https://cloud.google.com/scheduler/
NOTES
This command is currently in beta and might change without notice. Thesevariants are also available:
gcloudschedulerjobsupdatehttp
gcloudalphaschedulerjobsupdatehttp

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-05-29 UTC.