pub struct Job {Show 13 fields
pub name: String,
pub description: String,
pub schedule: String,
pub time_zone: String,
pub user_update_time: Option<Timestamp>,
pub state: i32,
pub status: Option<Status>,
pub schedule_time: Option<Timestamp>,
pub last_attempt_time: Option<Timestamp>,
pub retry_config: Option<RetryConfig>,
pub attempt_deadline: Option<Duration>,
pub legacy_app_engine_cron: bool,
pub target: Option<Target>,
}
Expand description
Configuration for a job. The maximum allowed size for a job is 1MB.
Fields§
§name: String
Optionally caller-specified in [CreateJob][google.cloud.scheduler.v1beta1.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 projectsLOCATION_ID
is the canonical ID for the job’s location. The list of available locations can be obtained by calling [ListLocations][google.cloud.location.Locations.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.
description: String
Optionally caller-specified in [CreateJob][google.cloud.scheduler.v1beta1.CloudScheduler.CreateJob] or [UpdateJob][google.cloud.scheduler.v1beta1.CloudScheduler.UpdateJob].
A human-readable description for the job. This string must not contain more than 500 characters.
schedule: String
Required, except when used with [UpdateJob][google.cloud.scheduler.v1beta1.CloudScheduler.UpdateJob].
Describes the schedule on which the job will be executed.
The schedule can be either of the following types:
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+1
th execution is scheduled to run at
16:00 but the n
th execution takes until 16:15, the n+1
th
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][google.cloud.scheduler.v1beta1.RetryConfig.retry_count] > 0 and a job attempt fails, the job will be tried a total of [retry_count][google.cloud.scheduler.v1beta1.RetryConfig.retry_count] times, with exponential backoff, until the next scheduled start time.
time_zone: String
Specifies the time zone to be used in interpreting [schedule][google.cloud.scheduler.v1beta1.Job.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).
user_update_time: Option<Timestamp>
Output only. The creation time of the job.
state: i32
Output only. State of the job.
status: Option<Status>
Output only. The response from the target for the last attempted execution.
schedule_time: Option<Timestamp>
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.
last_attempt_time: Option<Timestamp>
Output only. The time the last job attempt started.
retry_config: Option<RetryConfig>
Settings that determine the retry behavior.
attempt_deadline: Option<Duration>
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][google.cloud.scheduler.v1beta1.RetryConfig].
The default and the allowed values depend on the type of target:
-
For [HTTP targets][google.cloud.scheduler.v1beta1.Job.http_target], the default is 3 minutes. The deadline must be in the interval [15 seconds, 30 minutes].
-
For [App Engine HTTP targets][google.cloud.scheduler.v1beta1.Job.app_engine_http_target], 0 indicates that the request has the default deadline. The default deadline depends on the scaling type of the service: 10 minutes for standard apps with automatic scaling, 24 hours for standard apps with manual and basic scaling, and 60 minutes for flex apps. If the request deadline is set, it must be in the interval [15 seconds, 24 hours 15 seconds].
-
For [Pub/Sub targets][google.cloud.scheduler.v1beta1.Job.pubsub_target], this field is ignored.
legacy_app_engine_cron: bool
Immutable. This field is used to manage the legacy App Engine Cron jobs using the Cloud Scheduler API. If the field is set to true, the job will be considered a legacy job. Note that App Engine Cron jobs have fewer features than Cloud Scheduler jobs, e.g., are only limited to App Engine targets.
target: Option<Target>
Required.
Delivery settings containing destination and parameters.
Implementations§
Trait Implementations§
source§impl Message for Job
impl Message for Job
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.impl StructuralPartialEq for Job
Auto Trait Implementations§
impl !Freeze for Job
impl RefUnwindSafe for Job
impl Send for Job
impl Sync for Job
impl Unpin for Job
impl UnwindSafe for Job
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request