Skip to main content

Schedule

Schedule is the canonical representation of a scheduled job.

Creating any schedule type returns the Schedule resource directly, with the same shape used by get, pause and resume operations.

triggerCount: Cumulative firings.

failureCount: Cumulative failed first attempts; a later successful retry does not erase the earlier failure.

consecutiveFailureCount: Current sequence of failed firings; a successful attempt resets it. This counter drives auto-pause.

Zero-valued counters can be omitted. Nonzero 64-bit counters are decimal JSON strings; preserve their integer precision.

Usage profiles​

UsageFields and validation
In responsesView fields

In responses​

API JSON uses JSON field names (camelCase).

FieldTypePresenceMeaning
scheduleIdstringOptionalServer-assigned identifier of the scheduled job, prefixed with "sched_".
tenantIdstringOptionalIdentifier of the tenant that owns or scopes this record.
projectIdstringOptionalIdentifier of the project within the tenant that scopes this record.
ownerSubjectstringOptionalSubject identifier of the owning user or service account.
namestringOptionalHuman-readable name assigned to the scheduled job.
descriptionstringOptionalHuman-readable explanation of the scheduled job.
scheduleTypestring (SCHEDULE_TYPE_CRON, SCHEDULE_TYPE_ONCE, SCHEDULE_TYPE_RECURRING_INTERVAL) or integer (int32)OptionalSchedule type and expression.
cronExpressionstringOptionalCron expression. Populated when schedule_type is SCHEDULE_TYPE_CRON.
timezonestringOptionalIANA timezone for cron evaluation. Default "UTC".
scheduledAtstring (date-time)OptionalExact fire time. Populated when schedule_type is SCHEDULE_TYPE_ONCE.
intervalSecondsinteger (int32)OptionalInterval between firings in seconds. Populated when schedule_type is SCHEDULE_TYPE_RECURRING_INTERVAL. Minimum: -2147483648. Maximum: 2147483647.
targetScheduleTargetOptionalDestination and invocation settings for the scheduled job.
statestring (SCHEDULE_STATUS_ACTIVE, SCHEDULE_STATUS_PAUSED, SCHEDULE_STATUS_DELETED) or integer (int32)OptionalLifecycle status controlling whether the scheduled job can trigger.
retryPolicyRetryPolicyOptionalAttempt limits and backoff settings for the scheduled target.
metadataMap from string to JSON valueOptionalApplication-defined JSON metadata attached to the scheduled job.
autoPauseThresholdinteger (int32)OptionalIf consecutive_failure_count reaches this threshold the job is auto-paused (state PAUSED, paused_by_subject "system:auto-pause"). It is compared against consecutive_failure_count, NOT failure_count. failure_count is cumulative for the schedule's whole life, so a healthy schedule that collects scattered failures over months would eventually exceed any threshold and pause itself forever. 0 disables auto-pause; otherwise must be in the range [3, 100]. Default 10. Minimum: -2147483648. Maximum: 2147483647.
externalIdstringOptionalClient-supplied external id. Echoed back when set; empty otherwise. Optional, immutable, unique within (tenant_id, project_id) among live schedules. Never starts with the reserved system-id prefix "sched_".
createdAtstring (date-time)OptionalTime at which the scheduled job was created.
createdBySubjectstringOptionalSubject identifier recorded when the schedule was created.
updatedAtstring (date-time)OptionalTime this record was most recently updated.
updatedBySubjectstringOptionalSubject identifier recorded when the schedule was last updated.
pausedAtstring (date-time)OptionalTime at which the schedule was paused.
pausedBySubjectstringOptionalSubject identifier recorded for the schedule pause.
pausedReasonstringOptionalExplanation recorded for the schedule pause.
resumedAtstring (date-time)OptionalTime at which the schedule was most recently resumed.
resumedBySubjectstringOptionalSubject identifier recorded for the schedule resume.
deletedAtstring (date-time)OptionalTime at which the schedule was deleted.
deletedBySubjectstringOptionalSubject identifier recorded for the schedule deletion.
lastTriggeredAtstring (date-time)OptionalTime when the schedule was last triggered.
nextTriggerAtstring (date-time)OptionalTime calculated for the next scheduled trigger.
triggerCountstring (int64)OptionalScheduled times that ran, cumulative for the schedule's whole life. Pattern: ^-?\d+$.
failureCountstring (int64)OptionalScheduled times whose first attempt failed, cumulative for the schedule's whole life. A firing that fails on attempt 1 and succeeds on retry still counts here — a failure was observed. This counter does NOT drive auto-pause. See consecutive_failure_count. Pattern: ^-?\d+$.
consecutiveFailureCountstring (int64)OptionalCurrent run of consecutive failed firings. This is the counter auto_pause_threshold is compared against. Incremented when a firing's first attempt fails; reset to 0 as soon as any attempt of any firing succeeds. So a firing that fails on attempt 1 and succeeds on retry has net zero effect here while still advancing failure_count — the target recovered, so the run is over. A non-success terminal outcome counts as a failure, including a firing cancelled on a terminal 4xx. Pattern: ^-?\d+$.

Values of scheduleType​

Expression format that determines when a scheduled job fires.

ValueNo.FormMeaning
SCHEDULE_TYPE_CRON1CanonicalFire according to the configured cron expression and timezone.
SCHEDULE_TYPE_ONCE2CanonicalFire once at the configured scheduled timestamp.
SCHEDULE_TYPE_RECURRING_INTERVAL3CanonicalFire repeatedly at the configured interval in seconds.

Values of state​

Lifecycle condition that determines whether a scheduled job may trigger.

ValueNo.FormMeaning
SCHEDULE_STATUS_ACTIVE1CanonicalThe schedule is active and can trigger at its next matching time.
SCHEDULE_STATUS_PAUSED2CanonicalThe schedule is paused and does not trigger until resumed.
SCHEDULE_STATUS_DELETED3CanonicalThe schedule has been deleted; this is a schedule condition, not an execution outcome.

Where used​

ReferenceRelationship
Create a scheduled jobPOST /api/v1/scheduler/create-job
Get a scheduled jobPOST /api/v1/scheduler/get-job
List scheduled jobsPOST /api/v1/scheduler/list-jobs
Pause a scheduled jobPOST /api/v1/scheduler/pause-job
Resume a scheduled jobPOST /api/v1/scheduler/resume-job
Update a scheduled jobPOST /api/v1/scheduler/update-job

Download the public reference contract.

Document: DOC-API-MODEL-schedule.