cURL
curl --request GET "${HARNESS_URL}/harness/cronjobs/${CRONJOB_ID}/runs" \
--header "Authorization: Bearer ${HARNESS_TOKEN}"import json
import os
from urllib.request import Request, urlopen
base_url = os.environ["HARNESS_URL"]
headers = {"Authorization": "Bearer " + os.environ["HARNESS_TOKEN"]}
job_id = os.environ["CRONJOB_ID"]
request = Request(base_url + f"/harness/cronjobs/{job_id}/runs", headers=headers, method="GET")
with urlopen(request) as response:
print(json.load(response))const baseUrl = process.env.HARNESS_URL;
const headers = { Authorization: `Bearer ${process.env.HARNESS_TOKEN}` };
const response = await fetch(`${baseUrl}/harness/cronjobs/${process.env.CRONJOB_ID}/runs`, {
method: "GET",
headers,
});
if (!response.ok) throw new Error(await response.text());
console.log(await response.json());{
"items": [
{
"cronjob_id": "0e58ff7f7dcbf348c252fc70e7fdb587",
"run_id": "8210479599999-677bde100cec511735b2",
"revision": 1,
"scheduled_at": "2026-09-16T01:00:00Z",
"created_at": "2026-09-16T01:00:00Z",
"prompt": "Summarize recent activity",
"harness": null,
"timeout_seconds": 1800,
"state": "succeeded",
"owner": "replica-1",
"started_at": "2026-09-16T01:00:00+00:00",
"completed_at": "2026-09-16T01:00:10+00:00",
"lease_until": "2026-09-16T01:01:00+00:00",
"cancel_requested": false,
"output": "Daily report",
"error": ""
}
],
"next_cursor": ""
}Scheduled jobs
List execution history
Read persisted execution records, newest scheduled occurrence first
GET
/
harness
/
cronjobs
/
{job_id}
/
runs
cURL
curl --request GET "${HARNESS_URL}/harness/cronjobs/${CRONJOB_ID}/runs" \
--header "Authorization: Bearer ${HARNESS_TOKEN}"import json
import os
from urllib.request import Request, urlopen
base_url = os.environ["HARNESS_URL"]
headers = {"Authorization": "Bearer " + os.environ["HARNESS_TOKEN"]}
job_id = os.environ["CRONJOB_ID"]
request = Request(base_url + f"/harness/cronjobs/{job_id}/runs", headers=headers, method="GET")
with urlopen(request) as response:
print(json.load(response))const baseUrl = process.env.HARNESS_URL;
const headers = { Authorization: `Bearer ${process.env.HARNESS_TOKEN}` };
const response = await fetch(`${baseUrl}/harness/cronjobs/${process.env.CRONJOB_ID}/runs`, {
method: "GET",
headers,
});
if (!response.ok) throw new Error(await response.text());
console.log(await response.json());{
"items": [
{
"cronjob_id": "0e58ff7f7dcbf348c252fc70e7fdb587",
"run_id": "8210479599999-677bde100cec511735b2",
"revision": 1,
"scheduled_at": "2026-09-16T01:00:00Z",
"created_at": "2026-09-16T01:00:00Z",
"prompt": "Summarize recent activity",
"harness": null,
"timeout_seconds": 1800,
"state": "succeeded",
"owner": "replica-1",
"started_at": "2026-09-16T01:00:00+00:00",
"completed_at": "2026-09-16T01:00:10+00:00",
"lease_until": "2026-09-16T01:01:00+00:00",
"cancel_requested": false,
"output": "Daily report",
"error": ""
}
],
"next_cursor": ""
}Requires a Harness Runtime deployed with AgentKit CLI 0.54.0 and scheduled tasks enabled
Returns persisted execution history, newest scheduled occurrence first. Use Get a scheduled task or Get an execution result for running or newly completed executions not yet saved to history
Pass
next_cursor unchanged to request the next page; an empty string indicates the final pageAuthorizations
Runtime access credential for a service-authenticated Harness, such as a Runtime API key; shared OAuth deployments do not support background scheduled tasks
Path Parameters
Task ID containing 32 lowercase hexadecimal characters
Pattern:
^[a-f0-9]{32}$Query Parameters
next_cursor from the previous page; omit or use an empty string for the first request
Maximum string length:
4096Maximum records per page, from 1 to 1000
Required range:
1 <= x <= 1000Last modified on September 19, 2026