Create a recurring schedule that starts a task, a workflow or an agent on a cron expression, or, on REST and GraphQL only, activate a schedule declared in source (the MCP tool creates manual schedules only); returns the schedule: a new schedule is active, and a source schedule that was activated before keeps its current status. Requires project.runs.write.
Arguments
projectReferenceString!requiredinputCreateScheduleInput!requiredinput.nameString!requiredinput.targetScheduleTargetInput!requiredinput.scheduleString!requiredThe cron expression.
input.timezoneStringIANA time zone name.
input.runtimeTargetKindRuntimeTargetKindOne of
main_branch,environment,preview_branch.input.runtimeTargetEnvironmentIdIDinput.runtimeTargetBranchIdIDinput.configJSONJSON object passed to each run.
input.timeoutSecondsIntinput.backoffLimitIntinput.concurrencyPolicyScheduleConcurrencyPolicyOne of
allow,forbid,replace.input.maxRunsIntNull for no limit.
input.definitionSourceScheduleDefinitionSourcemanual (default), or source to activate a source schedule, which requires sourceTriggerId, sourcePath and sourceHash. One of
manual,source.input.sourceTriggerIdStringinput.sourcePathStringinput.sourceHashString
Responses
mutation CreateSchedule($projectReference: String!, $input: CreateScheduleInput!) { createSchedule(projectReference: $projectReference, input: $input) { id projectId name status target { kind id conversationMode conversationId } schedule timezone runtimeTargetKind runtimeTargetEnvironmentId runtimeTargetBranchId config timeoutSeconds backoffLimit concurrencyPolicy definitionSource sourceTriggerId sourcePath sourceHash lastScheduledAt lastSuccessfulAt health maxRuns runCount completedAt pausedReason pausedAt lastFailureAt lastFailureCode lastFailureMessage lastFailureRunId createdBy integrationRequirements { integration requiredScopes } createdAt updatedAt }}{ "data": { "createSchedule": { "id": "string", "projectId": "string", "name": "string", "status": "active", "target": { "kind": "task", "id": "string", "conversationMode": "create_new", "conversationId": "string" }, "schedule": "string", "timezone": "string", "runtimeTargetKind": "main_branch", "runtimeTargetEnvironmentId": "string", "runtimeTargetBranchId": "string", "config": {}, "timeoutSeconds": 0, "backoffLimit": 0, "concurrencyPolicy": "allow", "definitionSource": "manual", "sourceTriggerId": "string", "sourcePath": "string", "sourceHash": "string", "lastScheduledAt": "2026-01-01T00:00:00Z", "lastSuccessfulAt": "2026-01-01T00:00:00Z", "health": {}, "maxRuns": 0, "runCount": 0, "completedAt": "2026-01-01T00:00:00Z", "pausedReason": "string", "pausedAt": "2026-01-01T00:00:00Z", "lastFailureAt": "2026-01-01T00:00:00Z", "lastFailureCode": "string", "lastFailureMessage": "string", "lastFailureRunId": "string", "createdBy": "string", "integrationRequirements": [ { "integration": "string", "requiredScopes": [ "string" ] } ], "createdAt": "2026-01-01T00:00:00Z", "updatedAt": "2026-01-01T00:00:00Z" } }}The Schedule! in data.createSchedule.