Skip to main content
PATCH
/
api
/
v1
/
cron-jobs
/
{id}
Update Cron Job
curl --request PATCH \
  --url http://localhost:3301/api/v1/cron-jobs/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "schedule_interval_minutes": 2,
  "schedule_start_minute": 29,
  "request_url": "<string>",
  "request_method": "GET",
  "request_headers": {},
  "request_body": {},
  "is_enabled": true
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "schedule_interval_minutes": 2,
  "schedule_start_minute": 29,
  "request_url": "<string>",
  "request_method": "GET",
  "request_headers": {},
  "request_body": {},
  "runs_count": 123,
  "success_run_count": 123,
  "failure_run_count": 123,
  "last_run_at": "2023-11-07T05:31:56Z",
  "next_run_at": "2023-11-07T05:31:56Z",
  "is_enabled": true,
  "workspace_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "owner_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

API key authentication

Path Parameters

id
string
required

CronJob ID

Body

application/json
name
string

Job name

Required string length: 1 - 255
schedule_interval_minutes
integer

Interval in minutes between runs

Required range: x >= 1
schedule_start_minute
integer

Starting minute for the schedule

Required range: 0 <= x <= 59
request_url
string<uri>

URL to call

request_method
enum<string>

HTTP method

Available options:
GET,
POST,
PUT,
DELETE
request_headers
object

HTTP headers

request_body
object

Request body for POST/PUT

is_enabled
boolean

Whether the job is enabled

Response

A scheduled job that makes HTTP requests at specified intervals

A scheduled job that makes HTTP requests at specified intervals

id
string<uuid>

Unique identifier

name
string

Job name

Required string length: 1 - 255
schedule_interval_minutes
integer

Interval in minutes between runs

Required range: x >= 1
schedule_start_minute
integer

Starting minute for the schedule

Required range: 0 <= x <= 59
request_url
string<uri>

URL to call

request_method
enum<string>

HTTP method

Available options:
GET,
POST,
PUT,
DELETE
request_headers
object

HTTP headers

request_body
object

Request body for POST/PUT

runs_count
integer

Total number of runs

success_run_count
integer

Number of successful runs

failure_run_count
integer

Number of failed runs

last_run_at
string<date-time> | null

Last run timestamp

next_run_at
string<date-time> | null

Next scheduled run

is_enabled
boolean

Whether the job is enabled

workspace_id
string<uuid>

Workspace ID

owner_id
string<uuid>

Owner user ID

created_at
string<date-time>

Creation timestamp

updated_at
string<date-time>

Last update timestamp