---
title: "Update an agent schedule"
method: POST
path: "/api/v2/agent/updateCronSchedule"
tags: ["Agent"]
---

# Update an agent schedule

`POST /api/v2/agent/updateCronSchedule`

## Request

- Base URL: `https://zeropath.com`
- URL: `https://zeropath.com/api/v2/agent/updateCronSchedule`
- Auth: API key in header `X-ZeroPath-API-Token-Id` and API key in header `X-ZeroPath-API-Token-Secret`

Update a recurring assistant schedule. Agent cron schedules run prompts on a recurring time cadence. Use them for polling-style checks, time-window summaries, timeout-rate monitoring, and requests phrased as "every N hours/days" or "on a schedule". For example, create a cron schedule to monitor PR scan timeout rates; do not create a LONG_RUNNING_SCAN event trigger for that recurring workflow. Requires agent management permission. Repository and tag scope are revalidated before changes are saved.

## Request body

- AgentUpdateCronScheduleRequest
  - `organizationId` string: Organization ID (injected by MCP server)
  - `scheduleId` string, uuid, required: Schedule ID from agent.listCronSchedules.
  - `cronExpression` string: Standard 5-field cron expression evaluated in UTC. Agent cron schedules run prompts on a recurring time cadence. Use them for polling-style checks, time-window summaries, timeout-rate monitoring, and requests phrased as "every N hours/days" or "on a schedule". For example, create a cron schedule to monitor PR scan timeout rates; do not create a LONG_RUNNING_SCAN event trigger for that recurring workflow.
  - `prompt` string
  - `enabled` boolean
  - `trusted` boolean: Saved Trusted setting. Repository- and tag-scoped jobs always use restricted execution.
  - `modelStrength` 'LOW' | 'HIGH'
  - `repositoryIds` string[]: Replace explicit repository selection. To switch to organization-wide scope, explicitly send both repositoryIds: [] and tagIds: [].
  - `tagIds` string[]: Replace selected tags. Omitting a selection preserves it; clearing one selection alone preserves SELECTED mode.

## Response `200`

Schedule updated

- AgentCronScheduleMutationResponse
  - `schedule` object, required
    - `id` string, uuid, required
    - `name` string, required
    - `cronExpression` string, required
    - `prompt` string, required
    - `enabled` boolean, required
    - `trusted` boolean, required: Saved Trusted setting.
    - `effectiveTrusted` boolean, required: Actual execution mode. Always false for SELECTED scope.
    - `configurationError` string, nullable, required: Cadence validation error, or null when the schedule can run.
    - `scopeMode` 'ALL' | 'SELECTED', required
    - `modelStrength` 'LOW' | 'HIGH', required
    - `lastRunAt` string, date-time, nullable, required
    - `nextRunAt` string, date-time, nullable, required
    - `createdAt` string, date-time, required
    - `updatedAt` string, date-time, required

## Other responses

- `400`: Error Response
- `401`: Error Response
- `403`: Error Response
- `404`: Error Response

---

[API](https://skmtc.dev/zeropath/apis/zeropath-api.md) - [All operations](https://skmtc.dev/zeropath/apis/zeropath-api/llms.txt) - [OpenAPI document](https://skmtc.dev/zeropath/apis/zeropath-api/revisions/126e9c80ba0d?raw)
