REST Resource: projects.locations.schedules

Resource: Schedule

An instance of a Schedule periodically schedules runs to make API calls based on user specified time specification and API request type.

Fields
name string

Immutable. The resource name of the Schedule.

displayName string

Required. user provided name of the Schedule. The name can be up to 128 characters long and can consist of any UTF-8 characters.

startTime string (Timestamp format)

Optional. timestamp after which the first run can be scheduled. Default to Schedule create time if not specified.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

endTime string (Timestamp format)

Optional. timestamp after which no new runs can be scheduled. If specified, The schedule will be completed when either endTime is reached or when scheduled_run_count >= maxRunCount. If not specified, new runs will keep getting scheduled until this Schedule is paused or deleted. Already scheduled runs will be allowed to complete. Unset if not specified.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

maxRunCount string (int64 format)

Optional. Maximum run count of the schedule. If specified, The schedule will be completed when either startedRunCount >= maxRunCount or when endTime is reached. If not specified, new runs will keep getting scheduled until this Schedule is paused or deleted. Already scheduled runs will be allowed to complete. Unset if not specified.

startedRunCount string (int64 format)

Output only. The number of runs started by this schedule.

state enum (State)

Output only. The state of this Schedule.

createTime string (Timestamp format)

Output only. timestamp when this Schedule was created.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

updateTime string (Timestamp format)

Output only. timestamp when this Schedule was updated.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

nextRunTime string (Timestamp format)

Output only. timestamp when this Schedule should schedule the next run. Having a nextRunTime in the past means the runs are being started behind schedule.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

lastPauseTime string (Timestamp format)

Output only. timestamp when this Schedule was last paused. Unset if never paused.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

lastResumeTime string (Timestamp format)

Output only. timestamp when this Schedule was last resumed. Unset if never resumed from pause.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

maxConcurrentRunCount string (int64 format)

Required. Maximum number of runs that can be started concurrently for this Schedule. This is the limit for starting the scheduled requests and not the execution of the operations/jobs created by the requests (if applicable).

allowQueueing boolean

Optional. Whether new scheduled runs can be queued when max_concurrent_runs limit is reached. If set to true, new runs will be queued instead of skipped. Default to false.

catchUp boolean

Output only. Whether to backfill missed runs when the schedule is resumed from PAUSED state. If set to true, all missed runs will be scheduled. New runs will be scheduled after the backfill is complete. Default to false.

lastScheduledRunResponse object (RunResponse)

Output only. Response of the last scheduled run. This is the response for starting the scheduled requests and not the execution of the operations/jobs created by the requests (if applicable). Unset if no run has been scheduled yet.

Union field time_specification. Required. The time specification to launch scheduled runs. time_specification can be only one of the following:
cron string

Cron schedule (https://en.wikipedia.org/wiki/Cron) to launch scheduled runs. To explicitly set a timezone to the cron tab, apply a prefix in the cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or "TZ=${IANA_TIME_ZONE}". The ${IANA_TIME_ZONE} may only be a valid string from IANA time zone database. For example, "CRON_TZ=America/New_York 1 * * * *", or "TZ=America/New_York 1 * * * *".

Union field request. Required. The API request template to launch the scheduled runs. User-specified ID is not supported in the request template. request can be only one of the following:
createPipelineJobRequest object (CreatePipelineJobRequest)

Request for PipelineService.CreatePipelineJob. CreatePipelineJobRequest.parent field is required (format: projects/{project}/locations/{location}).

createNotebookExecutionJobRequest object (CreateNotebookExecutionJobRequest)
JSON representation
{
  "name": string,
  "displayName": string,
  "startTime": string,
  "endTime": string,
  "maxRunCount": string,
  "startedRunCount": string,
  "state": enum (State),
  "createTime": string,
  "updateTime": string,
  "nextRunTime": string,
  "lastPauseTime": string,
  "lastResumeTime": string,
  "maxConcurrentRunCount": string,
  "allowQueueing": boolean,
  "catchUp": boolean,
  "lastScheduledRunResponse": {
    object (RunResponse)
  },

  // Union field time_specification can be only one of the following:
  "cron": string
  // End of list of possible types for union field time_specification.

  // Union field request can be only one of the following:
  "createPipelineJobRequest": {
    object (CreatePipelineJobRequest)
  },
  "createNotebookExecutionJobRequest": {
    object (CreateNotebookExecutionJobRequest)
  }
  // End of list of possible types for union field request.
}

CreatePipelineJobRequest

Request message for PipelineService.CreatePipelineJob.

Fields
parent string

Required. The resource name of the Location to create the PipelineJob in. Format: projects/{project}/locations/{location}

pipelineJob object (PipelineJob)

Required. The PipelineJob to create.

pipelineJobId string

The id to use for the PipelineJob, which will become the final component of the PipelineJob name. If not provided, an id will be automatically generated.

This value should be less than 128 characters, and valid characters are /[a-z][0-9]-/.

JSON representation
{
  "parent": string,
  "pipelineJob": {
    object (PipelineJob)
  },
  "pipelineJobId": string
}

CreateNotebookExecutionJobRequest

Request message for [NotebookService.CreateNotebookExecutionJob]

Fields
parent string

Required. The resource name of the Location to create the NotebookExecutionJob. Format: projects/{project}/locations/{location}

notebookExecutionJob object (NotebookExecutionJob)

Required. The NotebookExecutionJob to create.

notebookExecutionJobId string

Optional. user specified id for the NotebookExecutionJob.

JSON representation
{
  "parent": string,
  "notebookExecutionJob": {
    object (NotebookExecutionJob)
  },
  "notebookExecutionJobId": string
}

State

Possible state of the schedule.

Enums
STATE_UNSPECIFIED Unspecified.
ACTIVE The Schedule is active. Runs are being scheduled on the user-specified timespec.
PAUSED The schedule is paused. No new runs will be created until the schedule is resumed. Already started runs will be allowed to complete.
COMPLETED The Schedule is completed. No new runs will be scheduled. Already started runs will be allowed to complete. Schedules in completed state cannot be paused or resumed.

RunResponse

status of a scheduled run.

Fields
scheduledRunTime string (Timestamp format)

The scheduled run time based on the user-specified schedule.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

runResponse string

The response of the scheduled run.

JSON representation
{
  "scheduledRunTime": string,
  "runResponse": string
}

Methods

create

Creates a Schedule.

delete

Deletes a Schedule.

get

Gets a Schedule.

list

Lists Schedules in a Location.

patch

Updates an active or paused Schedule.

pause

Pauses a Schedule.

resume

Resumes a paused Schedule to start scheduling new runs.