schedules
Creates, updates, deletes, gets or lists a schedules
resource.
Overview
Name | schedules |
Type | Resource |
Id | google.aiplatform.schedules |
Fields
The following fields are returned by SELECT
queries:
- get
- list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Immutable. The resource name of the Schedule. |
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. |
createNotebookExecutionJobRequest | object | Request for NotebookService.CreateNotebookExecutionJob. (id: GoogleCloudAiplatformV1CreateNotebookExecutionJobRequest) |
createPipelineJobRequest | object | Request for PipelineService.CreatePipelineJob. CreatePipelineJobRequest.parent field is required (format: projects/{project}/locations/{location}). (id: GoogleCloudAiplatformV1CreatePipelineJobRequest) |
createTime | string (google-datetime) | Output only. Timestamp when this Schedule was created. |
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 * * * *". |
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. |
endTime | string (google-datetime) | Optional. Timestamp after which no new runs can be scheduled. If specified, The schedule will be completed when either end_time is reached or when scheduled_run_count >= max_run_count. 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. |
lastPauseTime | string (google-datetime) | Output only. Timestamp when this Schedule was last paused. Unset if never paused. |
lastResumeTime | string (google-datetime) | Output only. Timestamp when this Schedule was last resumed. Unset if never resumed from pause. |
lastScheduledRunResponse | object | 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. (id: GoogleCloudAiplatformV1ScheduleRunResponse) |
maxConcurrentRunCount | string (int64) | 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). |
maxRunCount | string (int64) | Optional. Maximum run count of the schedule. If specified, The schedule will be completed when either started_run_count >= max_run_count or when end_time 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. |
nextRunTime | string (google-datetime) | Output only. Timestamp when this Schedule should schedule the next run. Having a next_run_time in the past means the runs are being started behind schedule. |
startTime | string (google-datetime) | Optional. Timestamp after which the first run can be scheduled. Default to Schedule create time if not specified. |
startedRunCount | string (int64) | Output only. The number of runs started by this schedule. |
state | string | Output only. The state of this Schedule. |
updateTime | string (google-datetime) | Output only. Timestamp when this Schedule was updated. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Immutable. The resource name of the Schedule. |
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. |
createNotebookExecutionJobRequest | object | Request for NotebookService.CreateNotebookExecutionJob. (id: GoogleCloudAiplatformV1CreateNotebookExecutionJobRequest) |
createPipelineJobRequest | object | Request for PipelineService.CreatePipelineJob. CreatePipelineJobRequest.parent field is required (format: projects/{project}/locations/{location}). (id: GoogleCloudAiplatformV1CreatePipelineJobRequest) |
createTime | string (google-datetime) | Output only. Timestamp when this Schedule was created. |
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 * * * *". |
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. |
endTime | string (google-datetime) | Optional. Timestamp after which no new runs can be scheduled. If specified, The schedule will be completed when either end_time is reached or when scheduled_run_count >= max_run_count. 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. |
lastPauseTime | string (google-datetime) | Output only. Timestamp when this Schedule was last paused. Unset if never paused. |
lastResumeTime | string (google-datetime) | Output only. Timestamp when this Schedule was last resumed. Unset if never resumed from pause. |
lastScheduledRunResponse | object | 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. (id: GoogleCloudAiplatformV1ScheduleRunResponse) |
maxConcurrentRunCount | string (int64) | 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). |
maxRunCount | string (int64) | Optional. Maximum run count of the schedule. If specified, The schedule will be completed when either started_run_count >= max_run_count or when end_time 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. |
nextRunTime | string (google-datetime) | Output only. Timestamp when this Schedule should schedule the next run. Having a next_run_time in the past means the runs are being started behind schedule. |
startTime | string (google-datetime) | Optional. Timestamp after which the first run can be scheduled. Default to Schedule create time if not specified. |
startedRunCount | string (int64) | Output only. The number of runs started by this schedule. |
state | string | Output only. The state of this Schedule. |
updateTime | string (google-datetime) | Output only. Timestamp when this Schedule was updated. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | projectsId , locationsId , schedulesId | Gets a Schedule. | |
list | select | projectsId , locationsId | filter , pageSize , pageToken , orderBy | Lists Schedules in a Location. |
create | insert | projectsId , locationsId | Creates a Schedule. | |
patch | update | projectsId , locationsId , schedulesId | updateMask | Updates an active or paused Schedule. When the Schedule is updated, new runs will be scheduled starting from the updated next execution time after the update time based on the time_specification in the updated Schedule. All unstarted runs before the update time will be skipped while already created runs will NOT be paused or canceled. |
delete | delete | projectsId , locationsId , schedulesId | Deletes a Schedule. | |
pause | exec | projectsId , locationsId , schedulesId | Pauses a Schedule. Will mark Schedule.state to 'PAUSED'. If the schedule is paused, no new runs will be created. Already created runs will NOT be paused or canceled. | |
resume | exec | projectsId , locationsId , schedulesId | Resumes a paused Schedule to start scheduling new runs. Will mark Schedule.state to 'ACTIVE'. Only paused Schedule can be resumed. When the Schedule is resumed, new runs will be scheduled starting from the next execution time after the current time based on the time_specification in the Schedule. If Schedule.catch_up is set up true, all missed runs will be scheduled for backfill first. |
Parameters
Parameters can be passed in the WHERE
clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
Name | Datatype | Description |
---|---|---|
locationsId | string | |
projectsId | string | |
schedulesId | string | |
filter | string | |
orderBy | string | |
pageSize | integer (int32) | |
pageToken | string | |
updateMask | string (google-fieldmask) |
SELECT
examples
- get
- list
Gets a Schedule.
SELECT
name,
allowQueueing,
catchUp,
createNotebookExecutionJobRequest,
createPipelineJobRequest,
createTime,
cron,
displayName,
endTime,
lastPauseTime,
lastResumeTime,
lastScheduledRunResponse,
maxConcurrentRunCount,
maxRunCount,
nextRunTime,
startTime,
startedRunCount,
state,
updateTime
FROM google.aiplatform.schedules
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND schedulesId = '{{ schedulesId }}' -- required;
Lists Schedules in a Location.
SELECT
name,
allowQueueing,
catchUp,
createNotebookExecutionJobRequest,
createPipelineJobRequest,
createTime,
cron,
displayName,
endTime,
lastPauseTime,
lastResumeTime,
lastScheduledRunResponse,
maxConcurrentRunCount,
maxRunCount,
nextRunTime,
startTime,
startedRunCount,
state,
updateTime
FROM google.aiplatform.schedules
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND filter = '{{ filter }}'
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND orderBy = '{{ orderBy }}';
INSERT
examples
- create
- Manifest
Creates a Schedule.
INSERT INTO google.aiplatform.schedules (
data__cron,
data__createPipelineJobRequest,
data__createNotebookExecutionJobRequest,
data__name,
data__displayName,
data__startTime,
data__endTime,
data__maxRunCount,
data__maxConcurrentRunCount,
data__allowQueueing,
projectsId,
locationsId
)
SELECT
'{{ cron }}',
'{{ createPipelineJobRequest }}',
'{{ createNotebookExecutionJobRequest }}',
'{{ name }}',
'{{ displayName }}',
'{{ startTime }}',
'{{ endTime }}',
'{{ maxRunCount }}',
'{{ maxConcurrentRunCount }}',
{{ allowQueueing }},
'{{ projectsId }}',
'{{ locationsId }}'
RETURNING
name,
allowQueueing,
catchUp,
createNotebookExecutionJobRequest,
createPipelineJobRequest,
createTime,
cron,
displayName,
endTime,
lastPauseTime,
lastResumeTime,
lastScheduledRunResponse,
maxConcurrentRunCount,
maxRunCount,
nextRunTime,
startTime,
startedRunCount,
state,
updateTime
;
# Description fields are for documentation purposes
- name: schedules
props:
- name: projectsId
value: string
description: Required parameter for the schedules resource.
- name: locationsId
value: string
description: Required parameter for the schedules resource.
- name: cron
value: string
description: >
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 * * * *".
- name: createPipelineJobRequest
value: object
description: >
Request for PipelineService.CreatePipelineJob. CreatePipelineJobRequest.parent field is required (format: projects/{project}/locations/{location}).
- name: createNotebookExecutionJobRequest
value: object
description: >
Request for NotebookService.CreateNotebookExecutionJob.
- name: name
value: string
description: >
Immutable. The resource name of the Schedule.
- name: displayName
value: string
description: >
Required. User provided name of the Schedule. The name can be up to 128 characters long and can consist of any UTF-8 characters.
- name: startTime
value: string
description: >
Optional. Timestamp after which the first run can be scheduled. Default to Schedule create time if not specified.
- name: endTime
value: string
description: >
Optional. Timestamp after which no new runs can be scheduled. If specified, The schedule will be completed when either end_time is reached or when scheduled_run_count >= max_run_count. 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.
- name: maxRunCount
value: string
description: >
Optional. Maximum run count of the schedule. If specified, The schedule will be completed when either started_run_count >= max_run_count or when end_time 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.
- name: maxConcurrentRunCount
value: string
description: >
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).
- name: allowQueueing
value: boolean
description: >
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.
UPDATE
examples
- patch
Updates an active or paused Schedule. When the Schedule is updated, new runs will be scheduled starting from the updated next execution time after the update time based on the time_specification in the updated Schedule. All unstarted runs before the update time will be skipped while already created runs will NOT be paused or canceled.
UPDATE google.aiplatform.schedules
SET
data__cron = '{{ cron }}',
data__createPipelineJobRequest = '{{ createPipelineJobRequest }}',
data__createNotebookExecutionJobRequest = '{{ createNotebookExecutionJobRequest }}',
data__name = '{{ name }}',
data__displayName = '{{ displayName }}',
data__startTime = '{{ startTime }}',
data__endTime = '{{ endTime }}',
data__maxRunCount = '{{ maxRunCount }}',
data__maxConcurrentRunCount = '{{ maxConcurrentRunCount }}',
data__allowQueueing = {{ allowQueueing }}
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND schedulesId = '{{ schedulesId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
allowQueueing,
catchUp,
createNotebookExecutionJobRequest,
createPipelineJobRequest,
createTime,
cron,
displayName,
endTime,
lastPauseTime,
lastResumeTime,
lastScheduledRunResponse,
maxConcurrentRunCount,
maxRunCount,
nextRunTime,
startTime,
startedRunCount,
state,
updateTime;
DELETE
examples
- delete
Deletes a Schedule.
DELETE FROM google.aiplatform.schedules
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND schedulesId = '{{ schedulesId }}' --required;
Lifecycle Methods
- pause
- resume
Pauses a Schedule. Will mark Schedule.state to 'PAUSED'. If the schedule is paused, no new runs will be created. Already created runs will NOT be paused or canceled.
EXEC google.aiplatform.schedules.pause
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@schedulesId='{{ schedulesId }}' --required;
Resumes a paused Schedule to start scheduling new runs. Will mark Schedule.state to 'ACTIVE'. Only paused Schedule can be resumed. When the Schedule is resumed, new runs will be scheduled starting from the next execution time after the current time based on the time_specification in the Schedule. If Schedule.catch_up is set up true, all missed runs will be scheduled for backfill first.
EXEC google.aiplatform.schedules.resume
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@schedulesId='{{ schedulesId }}' --required
@@json=
'{
"catchUp": {{ catchUp }}
}';