List a site's cron jobs
/v1/sites/{siteId}/cron-jobs Lists the site's cron jobs, oldest first (the order the panel shows), with what each runs and when. Whether each is running now, and how its latest run went, comes from GET /sites/{siteId}/cron-status; its runs, with their output, from GET /sites/{siteId}/cron-jobs/{jobId}/runs. A job's command or address can hold a password or a key, so every call is written to the token's request log.
Scopes
The token needs this scope. Without it, the request is refused with insufficient_scope (see Scopes).
-
sites:files - Files and logins. File Manager, WordPress logins, cron jobs, backup downloads and backup storage. Full access to the sites' code and data.
Path parameters
| Field | Type and description |
|---|---|
siteId Required | string The site's id. |
Query parameters
| Field | Type and description |
|---|---|
limit | integer 1 to 100 Default How many items to return, from 1 to 100. Default 25. |
cursor | string 1 to 1,024 characters The |
sort | string Default The field to sort by. Each list names the fields it can be sorted by. One of: |
order | string Default
One of: |
type | string Only jobs of this type. One of: |
enabled | string
One of: |
Example request
curl "https://api.rabbitflare.com/v1/sites/8a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d/cron-jobs?enabled=true" \
-H "Authorization: Bearer $RABBITFLARE_TOKEN" const res = await fetch("https://api.rabbitflare.com/v1/sites/8a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d/cron-jobs?enabled=true", {
headers: {
Authorization: `Bearer ${process.env.RABBITFLARE_TOKEN}`,
},
});
if (!res.ok) throw new Error(`Rabbitflare API error ${res.status}: ${await res.text()}`);
const { data, pagination } = await res.json();
console.log(data, pagination.nextCursor); import { Rabbitflare } from "@rabbitflare/api";
const rf = new Rabbitflare({ token: process.env.RABBITFLARE_TOKEN });
for await (const item of rf.sites.cronJobs.list({
siteId: "8a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d",
enabled: true,
})) {
console.log(item);
} <?php
$ch = curl_init('https://api.rabbitflare.com/v1/sites/8a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d/cron-jobs?enabled=true');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 120,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RABBITFLARE_TOKEN'),
],
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
if ($body === false || $status >= 400) {
throw new RuntimeException("Rabbitflare API error $status: $body");
}
$answer = json_decode($body, true);
print_r($answer['data']);
echo $answer['pagination']['nextCursor'] ?? 'Last page', PHP_EOL; import os
import requests
response = requests.get(
"https://api.rabbitflare.com/v1/sites/8a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d/cron-jobs",
headers={
"Authorization": "Bearer " + os.environ["RABBITFLARE_TOKEN"],
},
params={
"enabled": "true",
},
timeout=120,
)
response.raise_for_status()
answer = response.json()
print(answer["data"], answer["pagination"]["nextCursor"]) Response
200 OK Returns a list of CronJob objects in data, with a Pagination object in pagination.
The CronJob object's fields 10 fields
| Field | Type and description |
|---|---|
id | string The cron job's id. |
siteId | string The site it runs on. |
name | string The job's name. |
type | string What the job runs: Known values: |
target | string What it runs, by |
schedule | string When it runs: a cron schedule of five fields (minute, hour, day of month, month, day of week) in UTC, like |
timeoutSeconds | integer How long a run may take, in seconds, before it's stopped (60 to 7,200). |
enabled | boolean Whether it runs on its schedule. |
createdAt | string An ISO 8601 time, in UTC When the job was added. |
updatedAt | string An ISO 8601 time, in UTC When it was last changed. |
Example response
{
"data": [
{
"id": "4c1d2e3f-5a6b-4c7d-8e9f-0a1b2c3d4e5f",
"siteId": "8a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d",
"name": "Nightly clean-up",
"type": "wp_cli",
"target": "transient delete --expired",
"schedule": "0 3 * * *",
"timeoutSeconds": 900,
"enabled": true,
"createdAt": "2026-11-02T09:14:05.000Z",
"updatedAt": "2026-11-02T09:14:05.000Z"
}
],
"pagination": {
"limit": 25,
"hasMore": false,
"nextCursor": null
}
} Errors
The errors this request can answer besides those every request can (a missing token, a missing scope, the rate limits). Each answer is an Error object (see Errors).
| Status and code | When, and what to do |
|---|---|
400 invalid_ | A query parameter is unknown or has a wrong value ( Correct or remove the parameter named in |
400 invalid_ | The cursor isn't one this list gave, or was made with other filters or another sort. Start again from the first page, or keep the filters and sort the cursor was made with. |
403 trial_ | The site's server is on the free trial: WordPress sign-in, the File Manager and Cron Jobs switch on once it's kept. Keep the server in the control panel: they switch on by themselves. |
404 not_ | The resource doesn't exist, or isn't this account's. Check the id. Ids of other accounts' resources answer the same way. |