Skip to main content
GET
cURL
需要使用 AgentKit CLI 0.54.0 部署并启用定时任务的 Harness Runtime 响应可以是排队、运行中或终态记录,并非只有完成后才可读取。output 保存最终文本;失败时读取 error。超时与失败不会自动重试该次执行

授权

Authorization
string
header
必填

服务鉴权 Harness 的 Runtime 访问凭证,例如 Runtime API Key;共享 OAuth 部署不支持后台定时任务

路径参数

job_id
string
必填

任务 ID,32 位小写十六进制字符

Pattern: ^[a-f0-9]{32}$
run_id
string
必填

执行 ID,使用任务状态或执行历史返回的值

Pattern: ^[0-9]{13}-[a-f0-9]{20}$

响应

成功

cronjob_id
string
必填

所属任务 ID

Pattern: ^[a-f0-9]{32}$
run_id
string
必填

执行 ID,用于读取或取消该次执行

Pattern: ^[0-9]{13}-[a-f0-9]{20}$
revision
integer
必填

本次执行使用的任务修订号

scheduled_at
string<date-time>
必填

计划触发时间,UTC

created_at
string<date-time>
必填

执行记录创建时间,UTC

prompt
string
必填

本次执行的消息

harness
CronjobHarnessPublicOverrides · object | null
必填

该任务每次执行时应用的配置,仅应用显式提供的字段,未提供字段继承已部署智能体

timeout_seconds
integer
必填

本次执行的超时秒数

state
enum<string>
必填

执行状态

可用选项:
queued,
running,
succeeded,
failed,
cancelled,
skipped,
interrupted
owner
string | null
必填

执行本次任务的副本标识;尚未开始时为 null

started_at
string<date-time> | null
必填

执行开始时间,UTC;尚未开始时为 null

completed_at
string<date-time> | null
必填

执行结束时间,UTC;尚未结束时为 null

lease_until
string<date-time> | null
必填

当前执行有效期截止时间,UTC;尚未开始时为 null

cancel_requested
boolean
必填

是否已请求取消本次执行

output
string
必填

执行输出;失败时为空。成功输出最大 1 MiB

error
string
必填

失败、取消、跳过或中断的说明;无错误时为空字符串

coalesced_from
string<date-time>

补跑合并涉及的最早错过时间,UTC;仅发生触发合并时提供

最后修改于 2026年9月19日