Skip to content

List a cron job's runs

GET /v1/sites/{siteId}/cron-jobs/{jobId}/runs

Lists the job's last 20 runs, newest first, each with what it printed (the end of it, for long output). Skips in a row for the same reason are folded into one entry (repeats). They're read from the site's server, so it must be running. What a job prints 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

FieldType and description
siteId Required

string

The site's id.

jobId Required

string

The cron job's id.

Query parameters

FieldType and description
limit

integer 1 to 100 Default 25

How many items to return, from 1 to 100. Default 25.

cursor

string 1 to 1,024 characters

The nextCursor of the previous page, exactly as it was given. Leave it out for the first page.

sort

string Default startedAt

The field to sort by. Each list names the fields it can be sorted by.

One of: startedAt

order

string Default desc

asc (smallest or oldest first) or desc. Each list has its own default.

One of: ascdesc

status

string

Only runs that ended this way.

One of: successfailedtimeoutskipped

trigger

string

Only runs started this way.

One of: schedulemanual

Example request

curl "https://api.rabbitflare.com/v1/sites/8a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d/cron-jobs/4c1d2e3f-5a6b-4c7d-8e9f-0a1b2c3d4e5f/runs?status=success" \
  -H "Authorization: Bearer $RABBITFLARE_TOKEN"

Response

200 OK Returns a list of CronRun objects in data, with a Pagination object in pagination.

The CronRun object's fields 12 fields
FieldType and description
id

string

The run's id. It stays the same for as long as the run is kept.

startedAt

string An ISO 8601 time, in UTC

When it started. For skipped runs folded together (repeats over 1), the latest of them.

finishedAt

string or null An ISO 8601 time, in UTC

When it ended. Null while it runs.

durationMs

integer or null

How long it took, in milliseconds. Null while it runs.

exitCode

integer or null

The exit code it ended with (0 is success). Null when it didn't start, was stopped, or still runs.

status

string

How it ended: success (exit code 0), failed (another exit code, or it couldn't start), timeout (stopped at the job's timeoutSeconds) or skipped (it didn't run: see reason).

Known values: successfailedtimeoutskipped More can appear.

trigger

string

What started it: schedule, or manual (run by hand, in the panel or with POST …/actions/run).

Known values: schedulemanual More can appear.

reason

string or null

Why it was skipped, stopped or couldn't start, in a sentence (for example, the previous run was still going). Null otherwise.

outputBytes

integer

The size of everything it printed, in bytes.

truncated

boolean

Whether only the end of its output is kept: the last 16 KB of a longer output.

repeats

integer

How many runs this entry stands for: skips in a row for the same reason are folded into one entry. 1 otherwise.

output

string

What the job printed (its output and errors together), the end of it when truncated.

Example response

200 OK
{
  "data": [
    {
      "id": "1795057200000-48213",
      "startedAt": "2026-11-19T03:00:00.000Z",
      "finishedAt": "2026-11-19T03:00:02.000Z",
      "durationMs": 2140,
      "exitCode": 0,
      "status": "success",
      "trigger": "schedule",
      "reason": null,
      "outputBytes": 40,
      "truncated": false,
      "repeats": 1,
      "output": "Success: 14 expired transients deleted.\n"
    }
  ],
  "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 codeWhen, and what to do
400 invalid_parameter

A query parameter is unknown or has a wrong value (fields names it), or the query is too long: over 16,384 characters, or a parameter's name over 64.

Correct or remove the parameter named in fields.

400 invalid_cursor

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_locked

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_found

The resource doesn't exist, or isn't this account's.

Check the id. Ids of other accounts' resources answer the same way.

409 site_unavailable

The site isn't in a state that allows this (for example, it's still installing).

Wait until the site is active, then try again.

409 server_unavailable

The server isn't in a state that allows this (for example, it's off or still being set up).

Start the server, or wait until it's active, then try again.

409 server_restoring

The server is being restored, and nothing else can change it or its sites until that's done.

Wait until the restore finishes (the server's pendingAction is null again), then try again. A restore that stopped partway keeps pendingAction: "restore", with the server's lastError set, until our team has checked the server.

502 server_unreachable

The server didn't answer, or didn't finish the request.

Check that the server is running, then try again in a minute.

Rate limit

Heavy requests: 20 a minute per token, 40 per account. More in Rate limits.

Added on .

Popular

API docs