Class Job (2.6.0)

publicfinalclass JobextendsGeneratedMessageV3implementsJobOrBuilder

Configuration for a job. The maximum allowed size for a job is 100KB.

Protobuf type google.cloud.scheduler.v1beta1.Job

Implements

JobOrBuilder

Inherited Members

Static Fields

APP_ENGINE_HTTP_TARGET_FIELD_NUMBER

publicstaticfinalintAPP_ENGINE_HTTP_TARGET_FIELD_NUMBER
Field Value
Type Description
int

ATTEMPT_DEADLINE_FIELD_NUMBER

publicstaticfinalintATTEMPT_DEADLINE_FIELD_NUMBER
Field Value
Type Description
int

DESCRIPTION_FIELD_NUMBER

publicstaticfinalintDESCRIPTION_FIELD_NUMBER
Field Value
Type Description
int

HTTP_TARGET_FIELD_NUMBER

publicstaticfinalintHTTP_TARGET_FIELD_NUMBER
Field Value
Type Description
int

LAST_ATTEMPT_TIME_FIELD_NUMBER

publicstaticfinalintLAST_ATTEMPT_TIME_FIELD_NUMBER
Field Value
Type Description
int

NAME_FIELD_NUMBER

publicstaticfinalintNAME_FIELD_NUMBER
Field Value
Type Description
int

PUBSUB_TARGET_FIELD_NUMBER

publicstaticfinalintPUBSUB_TARGET_FIELD_NUMBER
Field Value
Type Description
int

RETRY_CONFIG_FIELD_NUMBER

publicstaticfinalintRETRY_CONFIG_FIELD_NUMBER
Field Value
Type Description
int

SCHEDULE_FIELD_NUMBER

publicstaticfinalintSCHEDULE_FIELD_NUMBER
Field Value
Type Description
int

SCHEDULE_TIME_FIELD_NUMBER

publicstaticfinalintSCHEDULE_TIME_FIELD_NUMBER
Field Value
Type Description
int

STATE_FIELD_NUMBER

publicstaticfinalintSTATE_FIELD_NUMBER
Field Value
Type Description
int

STATUS_FIELD_NUMBER

publicstaticfinalintSTATUS_FIELD_NUMBER
Field Value
Type Description
int

TIME_ZONE_FIELD_NUMBER

publicstaticfinalintTIME_ZONE_FIELD_NUMBER
Field Value
Type Description
int

USER_UPDATE_TIME_FIELD_NUMBER

publicstaticfinalintUSER_UPDATE_TIME_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

publicstaticJobgetDefaultInstance()
Returns
Type Description
Job

getDescriptor()

publicstaticfinalDescriptors.DescriptorgetDescriptor()
Returns
Type Description

newBuilder()

publicstaticJob.BuildernewBuilder()
Returns
Type Description

newBuilder(Job prototype)

publicstaticJob.BuildernewBuilder(Jobprototype)
Parameter
Name Description
prototype Job
Returns
Type Description

parseDelimitedFrom(InputStream input)

publicstaticJobparseDelimitedFrom(InputStreaminput)
Parameter
Name Description
input InputStream
Returns
Type Description
Job
Exceptions
Type Description

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticJobparseDelimitedFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Job
Exceptions
Type Description

parseFrom(byte[] data)

publicstaticJobparseFrom(byte[]data)
Parameter
Name Description
data byte[]
Returns
Type Description
Job
Exceptions
Type Description

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

publicstaticJobparseFrom(byte[]data,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Job
Exceptions
Type Description

parseFrom(ByteString data)

publicstaticJobparseFrom(ByteStringdata)
Parameter
Name Description
data ByteString
Returns
Type Description
Job
Exceptions
Type Description

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

publicstaticJobparseFrom(ByteStringdata,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Job
Exceptions
Type Description

parseFrom(CodedInputStream input)

publicstaticJobparseFrom(CodedInputStreaminput)
Parameter
Name Description
Returns
Type Description
Job
Exceptions
Type Description

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticJobparseFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Job
Exceptions
Type Description

parseFrom(InputStream input)

publicstaticJobparseFrom(InputStreaminput)
Parameter
Name Description
input InputStream
Returns
Type Description
Job
Exceptions
Type Description

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticJobparseFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Job
Exceptions
Type Description

parseFrom(ByteBuffer data)

publicstaticJobparseFrom(ByteBufferdata)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
Job
Exceptions
Type Description

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

publicstaticJobparseFrom(ByteBufferdata,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Job
Exceptions
Type Description

parser()

publicstaticParser<Job>parser()
Returns
Type Description

Methods

equals(Object obj)

publicbooleanequals(Objectobj)
Parameter
Name Description
obj Object
Returns
Type Description
Overrides

getAppEngineHttpTarget()

publicAppEngineHttpTargetgetAppEngineHttpTarget()

App Engine HTTP target.

.google.cloud.scheduler.v1beta1.AppEngineHttpTarget app_engine_http_target = 5;

Returns
Type Description
AppEngineHttpTarget

The appEngineHttpTarget.

getAppEngineHttpTargetOrBuilder()

publicAppEngineHttpTargetOrBuildergetAppEngineHttpTargetOrBuilder()

App Engine HTTP target.

.google.cloud.scheduler.v1beta1.AppEngineHttpTarget app_engine_http_target = 5;

Returns
Type Description

getAttemptDeadline()

publicDurationgetAttemptDeadline()

The deadline for job attempts. If the request handler does not respond by this deadline then the request is cancelled and the attempt is marked as a DEADLINE_EXCEEDED failure. The failed attempt can be viewed in execution logs. Cloud Scheduler will retry the job according to the RetryConfig. The allowed duration for this deadline is:

  • For HTTP targets, between 15 seconds and 30 minutes.
  • For App Engine HTTP targets, between 15 seconds and 24 hours.
  • For PubSub targets, this field is ignored.

.google.protobuf.Duration attempt_deadline = 22;

Returns
Type Description
Duration

The attemptDeadline.

getAttemptDeadlineOrBuilder()

publicDurationOrBuildergetAttemptDeadlineOrBuilder()

The deadline for job attempts. If the request handler does not respond by this deadline then the request is cancelled and the attempt is marked as a DEADLINE_EXCEEDED failure. The failed attempt can be viewed in execution logs. Cloud Scheduler will retry the job according to the RetryConfig. The allowed duration for this deadline is:

  • For HTTP targets, between 15 seconds and 30 minutes.
  • For App Engine HTTP targets, between 15 seconds and 24 hours.
  • For PubSub targets, this field is ignored.

.google.protobuf.Duration attempt_deadline = 22;

Returns
Type Description

getDefaultInstanceForType()

publicJobgetDefaultInstanceForType()
Returns
Type Description
Job

getDescription()

publicStringgetDescription()

Optionally caller-specified in CreateJob or UpdateJob. A human-readable description for the job. This string must not contain more than 500 characters.

string description = 2;

Returns
Type Description
String

The description.

getDescriptionBytes()

publicByteStringgetDescriptionBytes()

Optionally caller-specified in CreateJob or UpdateJob. A human-readable description for the job. This string must not contain more than 500 characters.

string description = 2;

Returns
Type Description
ByteString

The bytes for description.

getHttpTarget()

publicHttpTargetgetHttpTarget()

HTTP target.

.google.cloud.scheduler.v1beta1.HttpTarget http_target = 6;

Returns
Type Description
HttpTarget

The httpTarget.

getHttpTargetOrBuilder()

publicHttpTargetOrBuildergetHttpTargetOrBuilder()

HTTP target.

.google.cloud.scheduler.v1beta1.HttpTarget http_target = 6;

Returns
Type Description

getLastAttemptTime()

publicTimestampgetLastAttemptTime()

Output only. The time the last job attempt started.

.google.protobuf.Timestamp last_attempt_time = 18;

Returns
Type Description
Timestamp

The lastAttemptTime.

getLastAttemptTimeOrBuilder()

publicTimestampOrBuildergetLastAttemptTimeOrBuilder()

Output only. The time the last job attempt started.

.google.protobuf.Timestamp last_attempt_time = 18;

Returns
Type Description

getName()

publicStringgetName()

Optionally caller-specified in 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
  • LOCATION_ID is the canonical ID for the job's location. The list of available locations can be obtained by calling ListLocations. For more information, see https://cloud.google.com/about/locations/.
  • JOB_ID can contain only letters ([A-Za-z]), numbers ([0-9]), hyphens (-), or underscores (_). The maximum length is 500 characters.

string name = 1;

Returns
Type Description
String

The name.

getNameBytes()

publicByteStringgetNameBytes()

Optionally caller-specified in 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
  • LOCATION_ID is the canonical ID for the job's location. The list of available locations can be obtained by calling ListLocations. For more information, see https://cloud.google.com/about/locations/.
  • JOB_ID can contain only letters ([A-Za-z]), numbers ([0-9]), hyphens (-), or underscores (_). The maximum length is 500 characters.

string name = 1;

Returns
Type Description
ByteString

The bytes for name.

getParserForType()

publicParser<Job>getParserForType()
Returns
Type Description
Overrides

getPubsubTarget()

publicPubsubTargetgetPubsubTarget()

Pub/Sub target.

.google.cloud.scheduler.v1beta1.PubsubTarget pubsub_target = 4;

Returns
Type Description
PubsubTarget

The pubsubTarget.

getPubsubTargetOrBuilder()

publicPubsubTargetOrBuildergetPubsubTargetOrBuilder()

Pub/Sub target.

.google.cloud.scheduler.v1beta1.PubsubTarget pubsub_target = 4;

Returns
Type Description

getRetryConfig()

publicRetryConfiggetRetryConfig()

Settings that determine the retry behavior.

.google.cloud.scheduler.v1beta1.RetryConfig retry_config = 19;

Returns
Type Description
RetryConfig

The retryConfig.

getRetryConfigOrBuilder()

publicRetryConfigOrBuildergetRetryConfigOrBuilder()

Settings that determine the retry behavior.

.google.cloud.scheduler.v1beta1.RetryConfig retry_config = 19;

Returns
Type Description

getSchedule()

publicStringgetSchedule()

Required, except when used with UpdateJob. Describes the schedule on which the job will be executed. The schedule can be either of the following types:

  • Crontab
  • English-like schedule As a general rule, execution n + 1 of a job will not begin until execution n has finished. Cloud Scheduler will never allow two simultaneously outstanding executions. For example, this implies that if the n+1th execution is scheduled to run at 16:00 but the nth execution takes until 16:15, the n+1th execution will not start until 16:15. A scheduled start time will be delayed if the previous execution has not ended when its scheduled time occurs. If retry_count > 0 and a job attempt fails, the job will be tried a total of retry_count times, with exponential backoff, until the next scheduled start time.

string schedule = 20;

Returns
Type Description
String

The schedule.

getScheduleBytes()

publicByteStringgetScheduleBytes()

Required, except when used with UpdateJob. Describes the schedule on which the job will be executed. The schedule can be either of the following types:

  • Crontab
  • English-like schedule As a general rule, execution n + 1 of a job will not begin until execution n has finished. Cloud Scheduler will never allow two simultaneously outstanding executions. For example, this implies that if the n+1th execution is scheduled to run at 16:00 but the nth execution takes until 16:15, the n+1th execution will not start until 16:15. A scheduled start time will be delayed if the previous execution has not ended when its scheduled time occurs. If retry_count > 0 and a job attempt fails, the job will be tried a total of retry_count times, with exponential backoff, until the next scheduled start time.

string schedule = 20;

Returns
Type Description
ByteString

The bytes for schedule.

getScheduleTime()

publicTimestampgetScheduleTime()

Output only. The next time the job is scheduled. Note that this may be a retry of a previously failed attempt or the next execution time according to the schedule.

.google.protobuf.Timestamp schedule_time = 17;

Returns
Type Description
Timestamp

The scheduleTime.

getScheduleTimeOrBuilder()

publicTimestampOrBuildergetScheduleTimeOrBuilder()

Output only. The next time the job is scheduled. Note that this may be a retry of a previously failed attempt or the next execution time according to the schedule.

.google.protobuf.Timestamp schedule_time = 17;

Returns
Type Description

getSerializedSize()

publicintgetSerializedSize()
Returns
Type Description
int
Overrides

getState()

publicJob.StategetState()

Output only. State of the job.

.google.cloud.scheduler.v1beta1.Job.State state = 10;

Returns
Type Description
Job.State

The state.

getStateValue()

publicintgetStateValue()

Output only. State of the job.

.google.cloud.scheduler.v1beta1.Job.State state = 10;

Returns
Type Description
int

The enum numeric value on the wire for state.

getStatus()

publicStatusgetStatus()

Output only. The response from the target for the last attempted execution.

.google.rpc.Status status = 11;

Returns
Type Description
com.google.rpc.Status

The status.

getStatusOrBuilder()

publicStatusOrBuildergetStatusOrBuilder()

Output only. The response from the target for the last attempted execution.

.google.rpc.Status status = 11;

Returns
Type Description
com.google.rpc.StatusOrBuilder

getTargetCase()

publicJob.TargetCasegetTargetCase()
Returns
Type Description

getTimeZone()

publicStringgetTimeZone()

Specifies the time zone to be used in interpreting schedule. The value of this field must be a time zone name from the tz database. Note that some time zones include a provision for daylight savings time. The rules for daylight saving time are determined by the chosen tz. For UTC use the string "utc". If a time zone is not specified, the default will be in UTC (also known as GMT).

string time_zone = 21;

Returns
Type Description
String

The timeZone.

getTimeZoneBytes()

publicByteStringgetTimeZoneBytes()

Specifies the time zone to be used in interpreting schedule. The value of this field must be a time zone name from the tz database. Note that some time zones include a provision for daylight savings time. The rules for daylight saving time are determined by the chosen tz. For UTC use the string "utc". If a time zone is not specified, the default will be in UTC (also known as GMT).

string time_zone = 21;

Returns
Type Description
ByteString

The bytes for timeZone.

getUnknownFields()

publicfinalUnknownFieldSetgetUnknownFields()
Returns
Type Description
Overrides

getUserUpdateTime()

publicTimestampgetUserUpdateTime()

Output only. The creation time of the job.

.google.protobuf.Timestamp user_update_time = 9;

Returns
Type Description
Timestamp

The userUpdateTime.

getUserUpdateTimeOrBuilder()

publicTimestampOrBuildergetUserUpdateTimeOrBuilder()

Output only. The creation time of the job.

.google.protobuf.Timestamp user_update_time = 9;

Returns
Type Description

hasAppEngineHttpTarget()

publicbooleanhasAppEngineHttpTarget()

App Engine HTTP target.

.google.cloud.scheduler.v1beta1.AppEngineHttpTarget app_engine_http_target = 5;

Returns
Type Description
boolean

Whether the appEngineHttpTarget field is set.

hasAttemptDeadline()

publicbooleanhasAttemptDeadline()

The deadline for job attempts. If the request handler does not respond by this deadline then the request is cancelled and the attempt is marked as a DEADLINE_EXCEEDED failure. The failed attempt can be viewed in execution logs. Cloud Scheduler will retry the job according to the RetryConfig. The allowed duration for this deadline is:

  • For HTTP targets, between 15 seconds and 30 minutes.
  • For App Engine HTTP targets, between 15 seconds and 24 hours.
  • For PubSub targets, this field is ignored.

.google.protobuf.Duration attempt_deadline = 22;

Returns
Type Description
boolean

Whether the attemptDeadline field is set.

hasHttpTarget()

publicbooleanhasHttpTarget()

HTTP target.

.google.cloud.scheduler.v1beta1.HttpTarget http_target = 6;

Returns
Type Description
boolean

Whether the httpTarget field is set.

hasLastAttemptTime()

publicbooleanhasLastAttemptTime()

Output only. The time the last job attempt started.

.google.protobuf.Timestamp last_attempt_time = 18;

Returns
Type Description
boolean

Whether the lastAttemptTime field is set.

hasPubsubTarget()

publicbooleanhasPubsubTarget()

Pub/Sub target.

.google.cloud.scheduler.v1beta1.PubsubTarget pubsub_target = 4;

Returns
Type Description
boolean

Whether the pubsubTarget field is set.

hasRetryConfig()

publicbooleanhasRetryConfig()

Settings that determine the retry behavior.

.google.cloud.scheduler.v1beta1.RetryConfig retry_config = 19;

Returns
Type Description
boolean

Whether the retryConfig field is set.

hasScheduleTime()

publicbooleanhasScheduleTime()

Output only. The next time the job is scheduled. Note that this may be a retry of a previously failed attempt or the next execution time according to the schedule.

.google.protobuf.Timestamp schedule_time = 17;

Returns
Type Description
boolean

Whether the scheduleTime field is set.

hasStatus()

publicbooleanhasStatus()

Output only. The response from the target for the last attempted execution.

.google.rpc.Status status = 11;

Returns
Type Description
boolean

Whether the status field is set.

hasUserUpdateTime()

publicbooleanhasUserUpdateTime()

Output only. The creation time of the job.

.google.protobuf.Timestamp user_update_time = 9;

Returns
Type Description
boolean

Whether the userUpdateTime field is set.

hashCode()

publicinthashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
Type Description
Overrides

isInitialized()

publicfinalbooleanisInitialized()
Returns
Type Description
Overrides

newBuilderForType()

publicJob.BuildernewBuilderForType()
Returns
Type Description

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protectedJob.BuildernewBuilderForType(GeneratedMessageV3.BuilderParentparent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protectedObjectnewInstance(GeneratedMessageV3.UnusedPrivateParameterunused)
Parameter
Name Description
Returns
Type Description
Overrides

toBuilder()

publicJob.BuildertoBuilder()
Returns
Type Description

writeTo(CodedOutputStream output)

publicvoidwriteTo(CodedOutputStreamoutput)
Parameter
Name Description
Overrides Exceptions
Type Description

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

Last updated 2025年10月30日 UTC.