全部产品
Search
文档中心

云原生数据库 PolarDB:DescribePolarClawCronJobs - 列出所有PolarClaw定时任务

更新时间:Apr 29, 2026

查询PolarClaw中所有或指定的定时任务及其详细信息。

接口说明

请求说明

  • 通过此 API 可以获取 PolarClaw 应用中的所有定时任务,或者根据 JobIdList 参数过滤特定的任务。

  • 如果不提供 JobIdList 参数,则返回应用中的所有定时任务。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

调试

授权信息

当前API暂无授权信息透出。

请求语法

POST  HTTP/1.1

请求参数

名称

类型

必填

描述

示例值

ApplicationId

string

应用 ID

pa-**************

JobIdList

array

按 Job ID 列表过滤

0ee00f56-f467-4d41-858c-ca4ede2c770e,1ee00f56-f467-4d41-858c-ca4ede2c770f

string

Job ID

0ee00f56-f467-4d41-858c-ca4ede2c770e

IncludeDisabled

boolean

是否包含已禁用的任务,默认 true

true

IncludeRuns

boolean

是否包含运行历史,默认 false

true

RunLimit

integer

每个任务的运行历史条数上限,默认 10

10

返回参数

名称

类型

描述

示例值

object

Schema of Response

RequestId

string

请求 ID

2281C6C9-CBAB-1AFD-8400-670750CF6025_2212

Message

string

返回消息

successful

Code

integer

返回状态码

200

ApplicationId

string

应用 ID

pa-**************

Jobs

array<object>

定时任务列表

array<object>

定时任务

Id

string

任务 ID(UUID)

0ee00f56-f467-4d41-858c-ca4ede2c770e

Name

string

任务名称

test

Enabled

boolean

是否启用

true

DeleteAfterRun

boolean

是否在首次执行后删除

false

CreatedAtMs

integer

创建时间戳(毫秒)

1777370572517

UpdatedAtMs

integer

更新时间戳(毫秒)

1777368967284

Schedule

object

调度配置

Kind

string

调度类型:cron/every/at

cron

Expr

string

cron 表达式

0 9 * * *

Tz

string

IANA 时区

Asia/Shanghai

EveryMs

integer

间隔毫秒数

100000

AnchorMs

integer

间隔对齐基准时间戳

1777370572518

At

string

ISO 8601 时间戳

2026-04-10T09:00:00+08:00

SessionTarget

string

会话目标:main/isolated/current

main

WakeMode

string

唤醒模式:now/next-heartbeat

now

Payload

object

执行载荷

Kind

string

载荷类型:agentTurn/systemEvent

systemEvent

Message

string

Agent 对话提示词

Generate the daily report.

Text

string

系统事件文本

Generate the daily report.

Model

string

模型覆盖

bailian/qwen3.5-plus

TimeoutSeconds

integer

执行超时秒数

10

LightContext

boolean

是否使用轻量上下文

false

Deliver

boolean

是否投递输出到通道

true

Channel

string

投递通道 ID

feishu

To

string

投递目标

ou_***

BestEffortDeliver

boolean

投递失败是否忽略

false

AgentId

string

执行 Agent ID

main

SessionKey

string

会话路由键

agent:main:feishu:direct:***

Description

string

任务描述

Daily report generation

Delivery

object

结果投递配置

Mode

string

投递模式:none/announce/webhook

announce

Channel

string

投递通道

feishu

AccountId

string

通道账户 ID

default

To

string

投递目标

ou_***

BestEffort

boolean

投递失败是否忽略

false

State

object

运行状态

NextRunAtMs

integer

下次执行时间戳(毫秒)

1777424400000

LastRunAtMs

integer

上次执行时间戳(毫秒)

1777370544931

LastRunStatus

string

上次执行状态

ok

ConsecutiveErrors

integer

连续失败次数

0

Runs

array<object>

运行历史

array<object>

运行历史

Ts

integer

运行时间戳(毫秒)

1777370572518

JobId

string

关联任务 ID

f83f5278-1abe-40a6-b10e-ad3ecdc05de2

Action

string

动作:finished/error/skipped

finished

Status

string

状态:ok/error/skipped

ok

Summary

string

运行摘要文本

Generate the daily report.

Delivered

boolean

是否已投递

false

DeliveryStatus

string

投递状态

not-requested

SessionId

string

关联会话 ID

***

RunAtMs

integer

实际执行时间戳(毫秒)

1777370544931

DurationMs

integer

执行耗时(毫秒)

27586

NextRunAtMs

integer

下次执行时间戳(毫秒)

1777424400000

Model

string

使用的模型

bailian/qwen3.5-plus

Provider

string

模型提供商

bailian

Usage

object

Token 用量详情

InputTokens

integer

输入 token 数量

30250

OutputTokens

integer

输出 token 数量

30250

TotalTokens

integer

总 token 数量

60500

JobName

string

任务名称

test

Total

integer

任务总数

1

示例

正常返回示例

JSON格式

{
  "RequestId": "2281C6C9-CBAB-1AFD-8400-670750CF6025_2212",
  "Message": "successful",
  "Code": 200,
  "ApplicationId": "pa-**************",
  "Jobs": [
    {
      "Id": "0ee00f56-f467-4d41-858c-ca4ede2c770e",
      "Name": "test",
      "Enabled": true,
      "DeleteAfterRun": false,
      "CreatedAtMs": 1777370572517,
      "UpdatedAtMs": 1777368967284,
      "Schedule": {
        "Kind": "cron",
        "Expr": "0 9 * * *",
        "Tz": "Asia/Shanghai",
        "EveryMs": 100000,
        "AnchorMs": 1777370572518,
        "At": "2026-04-10T09:00:00+08:00"
      },
      "SessionTarget": "main",
      "WakeMode": "now",
      "Payload": {
        "Kind": "systemEvent",
        "Message": "Generate the daily report.",
        "Text": "Generate the daily report.",
        "Model": "bailian/qwen3.5-plus",
        "TimeoutSeconds": 10,
        "LightContext": false,
        "Deliver": true,
        "Channel": "feishu",
        "To": "ou_***",
        "BestEffortDeliver": false
      },
      "AgentId": "main",
      "SessionKey": "agent:main:feishu:direct:***",
      "Description": "Daily report generation",
      "Delivery": {
        "Mode": "announce",
        "Channel": "feishu",
        "AccountId": "default",
        "To": "ou_***",
        "BestEffort": false
      },
      "State": {
        "NextRunAtMs": 1777424400000,
        "LastRunAtMs": 1777370544931,
        "LastRunStatus": "ok",
        "ConsecutiveErrors": 0
      },
      "Runs": [
        {
          "Ts": 1777370572518,
          "JobId": "f83f5278-1abe-40a6-b10e-ad3ecdc05de2",
          "Action": "finished",
          "Status": "ok",
          "Summary": "Generate the daily report.",
          "Delivered": false,
          "DeliveryStatus": "not-requested",
          "SessionId": "***",
          "RunAtMs": 1777370544931,
          "DurationMs": 27586,
          "NextRunAtMs": 1777424400000,
          "Model": "bailian/qwen3.5-plus",
          "Provider": "bailian",
          "Usage": {
            "InputTokens": 30250,
            "OutputTokens": 30250,
            "TotalTokens": 60500
          },
          "JobName": "test"
        }
      ]
    }
  ],
  "Total": 1
}

错误码

访问错误中心查看更多错误码。

变更历史

更多信息,参考变更详情