Skip to main content
POST
cURL
需要使用 AgentKit CLI 0.54.0 部署并启用定时任务的 Harness Runtime 暂停会阻止未来执行,并取消仍在排队的执行。已经运行的执行不会被终止,需要使用取消一次执行单独请求取消

授权

Authorization
string
header
必填

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

路径参数

job_id
string
必填

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

Pattern: ^[a-f0-9]{32}$

响应

成功

name
string
必填

任务名称,1–128 个字符

Required string length: 1 - 128
prompt
string
必填

每次执行发送给智能体的消息,1–65536 个字符

Required string length: 1 - 65536
schedule
Schedule · object
必填

触发计划

harness
CronjobHarnessPublicOverrides · object | null
必填

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

enabled
boolean
必填

是否启用后续调度

timeout_seconds
integer
必填

单次执行超时,单位为秒;超时记为 failed,不自动重试该次执行

必填范围: 1 <= x <= 10800
misfire_policy
enum<string>
必填

latest 补跑最近一次错过的触发;skip 仅在该次触发未超出宽限时间时执行。两者均不逐次补跑所有历史触发

可用选项:
latest,
skip
misfire_grace_seconds
integer
必填

skip 策略允许的最大延迟,单位为秒

必填范围: 0 <= x <= 86400
cronjob_id
string
必填

所属任务 ID

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

任务修订号

created_at
string<date-time>
必填

任务创建时间,UTC

updated_at
string<date-time>
必填

任务最近更新时间,UTC

next_run_at
string<date-time> | null
必填

下次计划触发时间,UTC;没有后续触发时为 null

active
object | null
必填

当前排队、运行中或正在保存最终结果的执行

last_run
object | null
必填

最近已保存到历史的执行摘要

最后修改于 2026年9月19日