Skip to Content
SeyloDocs
API referenceCron jobs

Update a cron job

POST
/api/v1/cron.update

Changes a cron job's schedule, command, limits or enabled flag. Omitted fields keep their value; the node picks up the change at once.

Needs services.cron on the service (a grant on its project covers it). Available to MCP clients and the assistant.

Authorization

cookieseylo_session<token>

Request Body

application/json
  1. body
serviceId*string

Panel-issued id.

Match^[a-z0-9]{16}$
cronJobId*string

Panel-issued id.

Match^[a-z0-9]{16}$
name?string
Length1 <= length <= 60
schedule?string

Five-field cron expression or @hourly, @daily, @weekly, @monthly, @yearly.

Match^(@(hourly|daily|weekly|monthly|yearly)|(\S+\s+){4}\S+)$
Length1 <= length <= 120
timeZone?string
Match^[A-Za-z_]+(/[A-Za-z0-9_+-]+)*$
Length1 <= length <= 64
command?string

Run as sh -c .

Length1 <= length <= 4096
timeoutSeconds?integer
Range1 <= value <= 86400
concurrency?||

When a run is still going at the next tick: skip the new one, run both, or stop the old one.

enabled?boolean

Response Body

Success.

application/json
  1. response
id*string

Panel-issued id.

Match^[a-z0-9]{16}$
serviceId*string

Panel-issued id.

Match^[a-z0-9]{16}$
name*string
Length1 <= length <= 60
schedule*string

Five-field cron expression or @hourly, @daily, @weekly, @monthly, @yearly.

Match^(@(hourly|daily|weekly|monthly|yearly)|(\S+\s+){4}\S+)$
Length1 <= length <= 120
timeZone*string
Match^[A-Za-z_]+(/[A-Za-z0-9_+-]+)*$
Length1 <= length <= 64
command*string

Run as sh -c .

Length1 <= length <= 4096
timeoutSeconds*integer
Range1 <= value
concurrency*||

When a run is still going at the next tick: skip the new one, run both, or stop the old one.

enabled*boolean
nextRunAt*|null
lastRun*|null
createdAt*string
Formatdate-time
updatedAt*string
Formatdate-time
Example Request
curl -X POST 'https://example.com/api/v1/cron.update' \  -H 'Content-Type: application/json' \  -d '{  "serviceId": "string",  "cronJobId": "string"}'
Example Response
{  "id": "string",  "serviceId": "string",  "name": "string",  "schedule": "string",  "timeZone": "string",  "command": "string",  "timeoutSeconds": 1,  "concurrency": "forbid",  "enabled": true,  "nextRunAt": "2019-08-24T14:15:22Z",  "lastRun": {    "id": "string",    "cronJobId": "string",    "serviceId": "string",    "nodeId": "string",    "result": "running",    "manual": true,    "exitCode": 0,    "startedAt": "2019-08-24T14:15:22Z",    "finishedAt": "2019-08-24T14:15:22Z",    "durationMs": 0  },  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}