curl --request POST "${HARNESS_URL}/harness/cronjobs/${CRONJOB_ID}/pause" \
--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}/pause", headers=headers, method="POST")
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}/pause`, {
method: "POST",
headers,
});
if (!response.ok) throw new Error(await response.text());
console.log(await response.json());{
"name": "daily-report",
"prompt": "Summarize recent activity",
"schedule": {
"cron": "0 9 * * *",
"at": null,
"timezone": "Asia/Shanghai"
},
"enabled": false,
"timeout_seconds": 1800,
"misfire_policy": "latest",
"misfire_grace_seconds": 120,
"harness": null,
"cronjob_id": "0e58ff7f7dcbf348c252fc70e7fdb587",
"revision": 2,
"created_at": "2026-09-16T00:00:00Z",
"updated_at": "2026-09-16T00:00:00Z",
"next_run_at": "2026-09-16T01:00:00Z",
"active": null,
"last_run": null
}Pause a scheduled task
Prevent future starts and cancel queued execution; an execution already running continues
curl --request POST "${HARNESS_URL}/harness/cronjobs/${CRONJOB_ID}/pause" \
--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}/pause", headers=headers, method="POST")
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}/pause`, {
method: "POST",
headers,
});
if (!response.ok) throw new Error(await response.text());
console.log(await response.json());{
"name": "daily-report",
"prompt": "Summarize recent activity",
"schedule": {
"cron": "0 9 * * *",
"at": null,
"timezone": "Asia/Shanghai"
},
"enabled": false,
"timeout_seconds": 1800,
"misfire_policy": "latest",
"misfire_grace_seconds": 120,
"harness": null,
"cronjob_id": "0e58ff7f7dcbf348c252fc70e7fdb587",
"revision": 2,
"created_at": "2026-09-16T00:00:00Z",
"updated_at": "2026-09-16T00:00:00Z",
"next_run_at": "2026-09-16T01:00:00Z",
"active": null,
"last_run": null
}Authorizations
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
^[a-f0-9]{32}$Response
Success
Task name, 1–128 characters
1 - 128Message sent to the agent on each execution, 1–65536 characters
1 - 65536Trigger schedule
- Schedule
- Schedule
Show child attributes
Show child attributes
Settings applied to each execution of this task; explicit fields override the deployed agent and omitted fields inherit it
Show child attributes
Show child attributes
Whether future scheduling is enabled
Execution timeout in seconds; timeout records a failed execution without automatically retrying it
1 <= x <= 10800latest runs the most recent missed occurrence; skip runs it only within the grace period. Neither policy replays every missed occurrence
latest, skip Maximum lateness in seconds allowed by the skip policy
0 <= x <= 86400Owning task ID
^[a-f0-9]{32}$Task revision number
Task creation time in UTC
Most recent task update time in UTC
Next scheduled occurrence in UTC; null when no future occurrence remains
The queued or running execution, or an execution whose final result is still being persisted
Show child attributes
Show child attributes
Summary of the most recently persisted historical execution
Show child attributes
Show child attributes