v1

latestOpenAPI 3.1.0raw.githubusercontent.com2026-06-19273210655.1 KB
Scheduled Jobs

Create scheduled job

Create a specific scheduled job.

Processing mode: <small><code>async</code></small>

post/orgs/{organization}/servers/{server}/scheduled-jobs

Path parameters

organizationstring required

The organization slug

serverinteger required

The server ID

Request body

namestring nullable

The name of the command.

commandstring required

The command to run.

userstring required

The user to run the scheduled job as.

frequency'minutely' | 'hourly' | 'nightly' | 'weekly' | 'monthly' | 'reboot' | 'custom' required
cronstring nullable

The cron expression to use for the scheduled job. Only used if frequency is set to Custom.

heartbeatboolean nullable

Whether a heartbeat should be created for the scheduled job.

grace_period1 | 2 | 5 | 10 | 30 | 60

Example request

{
  "name": "My scheduled job",
  "command": "echo $(whoami)",
  "user": "root",
  "cron": "0 * * * *",
  "heartbeat": true
}

Response

JobResource