Skip to main content
POST
Add a new scheduled job

Authorizations

Authorization
string
header
required

Runtime context-key (rctx_*) issued by the Ravi gateway. Used by ordinary gateway operations; not accepted by Console-only operations. Bootstrap the first key with ravi daemon init-admin-key; rotate, derive, and revoke via the ravi context family. Specs: runtime/context-keys, sdk/auth.

Body

application/json
name
string
required

Job name

account
string

Account for channel delivery (auto-detected from agent)

agent
string

Agent ID (default: default agent)

at
string

One-shot time (e.g., 2025-02-01T15:00)

cron
string

Cron expression (e.g., '0 9 * * *')

deleteAfter
boolean

Delete job after first run

description
string

Job description

envFile
string

Env file loaded for shell jobs

every
string

Interval (e.g., 30m, 1h)

exec
string

Alias for --shell

idempotencyKey
string

Durable create idempotency key

isolated
boolean

Run in isolated session

message
string

Prompt message

onError
string

Error action, e.g. notify-session:

shell
string

Run a shell command directly without invoking an agent

timeout
string

Shell timeout, e.g. 60 or 5m

tz
string

Timezone (e.g., America/Sao_Paulo)

Response

Success — body conforms to the @Returns schema.

changedCount
number
required
job
object | null
required
status
string
required
target
object
required
warnings
string[]
{key}
any