POST
/
jobs
/
definition
curl --request POST \
  --url https:/api.schedo.dev/api/jobs/definition \
  --header 'Content-Type: application/json' \
  --data '{
  "blocking": true,
  "metadata": {},
  "name": "Name of your job",
  "schedule": "0 0 * * *",
  "timeout_seconds": 123
}'
{
  "blocking": true,
  "command": "<string>",
  "created_at": "<string>",
  "cron_expression": "<string>",
  "environment_id": 123,
  "id": 123,
  "key": "<string>",
  "last_run_at": "<string>",
  "max_retries": 123,
  "metadata": {},
  "muted": true,
  "name": "<string>",
  "next_run_at": "<string>",
  "paused": true,
  "retry_count": 123,
  "status": "<string>",
  "timeout": "<string>",
  "timeout_seconds": 123,
  "updated_at": "<string>"
}

Body

application/json
Body
name
string
required
Minimum length: 4
Example:

"Name of your job"

schedule
string
required
Example:

"0 0 * * *"

blocking
boolean
metadata
object
timeout_seconds
integer

Response

200 - application/json
OK
blocking
boolean

Blocking holds the value of the "blocking" field.

command
string

Command to execute

created_at
string

Time when the job was created

cron_expression
string

Cron expression for job scheduling

environment_id
integer

ID of the user who owns this job

id
integer

ID of the ent.

key
string

Key holds the value of the "key" field.

last_run_at
string

Time when the job was last executed

max_retries
integer

Maximum number of retry attempts

metadata
object

Additional metadata for the job

muted
boolean

Whether notifications for this job are muted

name
string

Name of the job

next_run_at
string

Scheduled time for next execution

paused
boolean

Paused holds the value of the "paused" field.

retry_count
integer

Number of retry attempts

status
string

Current job status (pending, running, completed, failed)

timeout
string

Maximum execution time before job is terminated

timeout_seconds
integer

Maximum execution time before job is terminated

updated_at
string

Time when the job was last updated