Skip to main content
PUT
Update a scheduled task
Changes the fields sent; cronExpression: null makes the task Manual. Only the creator or an admin may do this (403 otherwise). A cron fires at most hourly (400 otherwise), and a user can have 20 active tasks (409 past that).

Authorizations

Authorization
string
header
required

Token authentication. Send Authorization: Bearer <YOUR_TOKEN>.

Path Parameters

deploymentId
integer
required
taskId
integer
required

Body

application/json

UpdateScheduledTaskInput

agentId
integer | null

The agent that runs the task. Omit to leave unchanged; null resets it to the deployment default.

cronExpression
string | null

New standard 5-field cron, at most hourly (the minute field is a single number). Omit it to keep the current schedule; send null to make the task Manual.

Maximum string length: 100
description
string | null

Omit to leave unchanged. Send null to clear the description.

isEnabled
boolean | null

false pauses the schedule, true resumes it. Omit to leave unchanged. Explicit null answers 400.

name
string | null

Omit to leave unchanged. Explicit null answers 400.

Required string length: 1 - 255
notificationEnabled
boolean | null

Turn the inbox notification for finished runs on or off. Omit to leave unchanged. Explicit null answers 400.

prompt
string | null

New prompt, shown as the task's Instructions in Cube. Omit to leave unchanged. Explicit null answers 400.

Minimum string length: 1
timezone
string | null

New IANA time zone for the cron, e.g. America/New_York. Omit it to keep the current one. Explicit null answers 400.

Maximum string length: 100

Response

200 - application/json
deploymentId
integer
required
id
integer
required
isEnabled
boolean
required

False while the schedule is paused.

name
string
required
notificationEnabled
boolean
required

Whether a finished run notifies the creator in Cube's notification inbox.

prompt
string
required

What the agent is asked on every run, shown as the task's Instructions in Cube. Each run starts a new chat thread, so the prompt has to stand on its own.

timezone
string
required

IANA time zone the cron is read in, e.g. America/New_York. Defaults to UTC.

userId
integer
required

The creator. Every run executes as this user, and only they or an admin may change, delete or run the task.

agentId
integer | null

The agent that runs the task; null runs the deployment default.

cronExpression
string | null

Standard 5-field cron (minute hour day-of-month month day-of-week), e.g. 0 9 * * 1-5 for 9:00 on weekdays. Null when the task is Manual: it runs only when started with POST /scheduled-tasks/{taskId}/run.

description
string | null
nextRunAt
string | null

When the schedule next fires (ISO 8601, UTC); null for a Manual or paused task.