---
title: "Update a function scheduler"
method: PATCH
path: "/projects/{id}/functions/{functionId}/schedulers/{schedulerId}"
tags: ["Functions"]
---

# Update a function scheduler

`PATCH /projects/{id}/functions/{functionId}/schedulers/{schedulerId}`

## Request

- Base URL: `https://api.volcano.dev`
- URL: `https://api.volcano.dev/projects/{id}/functions/{functionId}/schedulers/{schedulerId}`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

## Path parameters

- `id` string, uuid, required
- `functionId` string, uuid, required
- `schedulerId` string, uuid, required

## Request body

- UpdateFunctionSchedulerRequest
  - `name` string
  - `enabled` boolean
  - `schedule` ScheduleRequest
    - `kind` 'cron'
    - `cron_expression` string, required: Standard 5-field cron expression evaluated in UTC. Seconds fields, descriptors, and Quartz syntax are not supported.
  - `payload` object
  - `regions` string[]

## Response `200`

Scheduler updated

- FunctionScheduler
  - `id` string, uuid
  - `project_id` string, uuid
  - `function_id` string, uuid
  - `function_kind` 'standard' | 'durable': Which collection the scheduled function belongs to. A project-wide scheduler list mixes both kinds, and this is what says whether the function is read back from `/projects/{id}/functions` or `/projects/{id}/durable-functions` — and whether a tick invokes it or starts a durable execution.
  - `name` string
  - `enabled` boolean
  - `schedule_kind` 'cron'
  - `cron_expression` string
  - `payload` object
  - `regions` string[]
  - `regions_explicit` boolean
  - `next_run_at` string, date-time
  - `last_started_at` string, date-time
  - `last_completed_at` string, date-time
  - `last_error` string
  - `run_count` integer: Total number of times this scheduler has executed. 0 for a scheduler that has never run.
  - `health` 'healthy' | 'failing': `failing` while `consecutive_failures` is above 0; `healthy` otherwise, including before its first run in the region the scheduler runs in now. A run from a region it moved away from does not count. For a durable function a run finishes when its execution does, so a run that starts but then fails counts as failed.
  - `consecutive_failures` integer: How many runs in a row have failed in the region the scheduler runs in now. Resets to 0 when a run succeeds, and starts at 0 in a region it moves to.
  - `last_run_status` 'succeeded' | 'failed': Outcome of the most recent finished run. Absent before the first.
  - `last_success_at` string, date-time: When the most recent successful run finished.
  - `last_failure_at` string, date-time: When the most recent failed run finished.
  - `created_at` string, date-time
  - `updated_at` string, date-time

## Other responses

- `400`: Invalid schedule, geofenced region, or a scheduler of this name already exists on the function.
- `404`: Function or scheduler not found

## Changes

- **2026-10-26** `4b0676e06128`: 5 info
  - added the optional property `consecutive_failures` to the response with the `200` status
  - added the optional property `health` to the response with the `200` status
  - added the optional property `last_failure_at` to the response with the `200` status
  - added the optional property `last_run_status` to the response with the `200` status
  - …1 more
- **2026-10-07** `23e7875e7c4c`: 1 info
  - the endpoint scheme security `ProjectAccessToken` was added to the API
- **2026-09-19** `3a6f365f3f35`: 5 breaking, 25 info
  - added the new path request parameter `functionId`
  - added the new path request parameter `id`
  - added the new path request parameter `schedulerId`
  - the request's body type changed from no type to `object`
  - …26 more
- **2026-08-27** `bb44e98aba2e`: 2 breaking, 24 warning
  - the request's body type changed from `object` to no type
  - the response's body type changed from `object` to no type for status `200`
  - deleted the `path` request parameter `functionId`
  - deleted the `path` request parameter `id`
  - …22 more
- **2026-07-27** `bb52784e098a`: 1 warning
  - the `name` request property's maxLength was set to `200`

[Operation history](https://skmtc.dev/kong/apis/volcano-api/changes/projects/:id/functions/:functionId/schedulers/:schedulerId/patch.md)

---

[API](https://skmtc.dev/kong/apis/volcano-api.md) - [All operations](https://skmtc.dev/kong/apis/volcano-api/llms.txt) - [OpenAPI document](https://skmtc.dev/kong/apis/volcano-api/revisions/84c4488f91e9?raw)
