全部產品
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
}

錯誤碼

訪問錯誤中心查看更多錯誤碼。

變更歷史

更多資訊,參考變更詳情