Scheduled Tasks

Create a scheduled task

Changed on
post/api/v1/deployments/{deploymentId}/scheduled-tasks

Request

  • Base URL: https://your-tenant.cubecloud.dev
  • URL: https://your-tenant.cubecloud.dev/api/v1/deployments/{deploymentId}/scheduled-tasks
  • Auth: HTTP bearer

Path parameters

deploymentIdinteger required

Request body

agentIdinteger nullable

The agent that runs the task. Omit for the deployment default.

cronExpressionstring nullable

Standard 5-field cron (minute hour day-of-month month day-of-week), e.g. 0 9 * * 1-5 for 9:00 on weekdays. A task runs at most once an hour, so the minute field is a single number. Null or omitted makes the task Manual: it runs only when started with POST /scheduled-tasks/{taskId}/run.

descriptionstring nullable
isEnabledboolean nullable

Create the schedule paused with false. Defaults to true.

namestring required
notificationEnabledboolean nullable

Notify the creator in Cube's notification inbox when a run finishes, whether it succeeds or fails. Defaults to false.

promptstring required

What the agent is asked on every run, shown as the task's Instructions in Cube. Each run starts a new chat thread with no memory of earlier ones, so write the whole request.

timezonestring nullable

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

Response

agentIdinteger nullable

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

cronExpressionstring nullable

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.

deploymentIdinteger required
descriptionstring nullable
idinteger required
isEnabledboolean required

False while the schedule is paused.

namestring required
nextRunAtstring nullable

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

notificationEnabledboolean required

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

promptstring 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.

timezonestring required

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

userIdinteger required

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

Changes

    • info

      added the new optional request property

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the new optional request property

    • info

      added the required property to the response with the status