DescribePolarClawCronJobs
Query all or specific scheduled tasks in PolarClaw and their details.
Operation description
Request description
You can use this API to retrieve all scheduled tasks in a PolarClaw application or filter specific tasks using the
JobIdListparameter.If you do not specify the
JobIdListparameter, the API returns all scheduled tasks in the application.
Try it now
Test
RAM authorization
Request syntax
POST HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ApplicationId |
string |
Yes |
Application ID |
pa-************** |
| JobIdList |
array |
No |
Filter by Job ID list |
0ee00f56-f467-4d41-858c-ca4ede2c770e,1ee00f56-f467-4d41-858c-ca4ede2c770f |
|
string |
No |
Job ID |
0ee00f56-f467-4d41-858c-ca4ede2c770e |
|
| IncludeDisabled |
boolean |
No |
Include disabled tasks. Default is true. |
true |
| IncludeRuns |
boolean |
No |
Include run history. Default is false. |
true |
| RunLimit |
integer |
No |
Maximum number of run history entries per task. Default is 10. |
10 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| RequestId |
string |
Request ID |
2281C6C9-CBAB-1AFD-8400-670750CF6025_2212 |
| Message |
string |
Response message |
successful |
| Code |
integer |
Status code |
200 |
| ApplicationId |
string |
Application ID |
pa-************** |
| Jobs |
array<object> |
List of scheduled tasks |
|
|
array<object> |
Scheduled task |
||
| Id |
string |
Task ID (UUID) |
0ee00f56-f467-4d41-858c-ca4ede2c770e |
| Name |
string |
Task name |
test |
| Enabled |
boolean |
Whether enabled |
true |
| DeleteAfterRun |
boolean |
Delete after first execution |
false |
| CreatedAtMs |
integer |
Creation timestamp (milliseconds) |
1777370572517 |
| UpdatedAtMs |
integer |
Update timestamp (milliseconds) |
1777368967284 |
| Schedule |
object |
Scheduling Configuration |
|
| Kind |
string |
Schedule type: cron/every/at |
cron |
| Expr |
string |
Cron expression |
0 9 * * * |
| Tz |
string |
IANA time zone |
Asia/Shanghai |
| EveryMs |
integer |
Interval in milliseconds |
100000 |
| AnchorMs |
integer |
Alignment anchor timestamp for interval |
1777370572518 |
| At |
string |
ISO 8601 timestamp |
2026-04-10T09:00:00+08:00 |
| SessionTarget |
string |
Session target: main/isolated/current |
main |
| WakeMode |
string |
Wake mode: now/next-heartbeat |
now |
| Payload |
object |
Execution payload |
|
| Kind |
string |
Payload type: agentTurn/systemEvent |
systemEvent |
| Message |
string |
Agent conversation prompt |
Generate the daily report. |
| Text |
string |
System event text |
Generate the daily report. |
| Model |
string |
Model override |
bailian/qwen3.5-plus |
| TimeoutSeconds |
integer |
Execution timeout in seconds |
10 |
| LightContext |
boolean |
Indicates whether lightweight context is used. |
false |
| Deliver |
boolean |
Deliver output to channel |
true |
| Channel |
string |
Delivery channel ID |
feishu |
| To |
string |
Delivery destination |
ou_*** |
| BestEffortDeliver |
boolean |
Ignore delivery failures |
false |
| AgentId |
string |
Execution Agent ID |
main |
| SessionKey |
string |
Session routing key |
agent:main:feishu:direct:*** |
| Description |
string |
Task description |
Daily report generation |
| Delivery |
object |
Result delivery configuration |
|
| Mode |
string |
Delivery mode: none/announce/webhook |
announce |
| Channel |
string |
Delivery channel |
feishu |
| AccountId |
string |
Channel account ID |
default |
| To |
string |
Delivery destination |
ou_*** |
| BestEffort |
boolean |
Ignore delivery failures |
false |
| State |
object |
Run status |
|
| NextRunAtMs |
integer |
Next execution timestamp (milliseconds) |
1777424400000 |
| LastRunAtMs |
integer |
Last execution timestamp (milliseconds) |
1777370544931 |
| LastRunStatus |
string |
Last execution status |
ok |
| ConsecutiveErrors |
integer |
Number of consecutive failures |
0 |
| Runs |
array<object> |
Run history |
|
|
array<object> |
Run history |
||
| Ts |
integer |
Run timestamp (milliseconds) |
1777370572518 |
| JobId |
string |
Associated task ID |
f83f5278-1abe-40a6-b10e-ad3ecdc05de2 |
| Action |
string |
Action: finished/error/skipped |
finished |
| Status |
string |
Status: ok/error/skipped |
ok |
| Summary |
string |
Run summary text |
Generate the daily report. |
| Delivered |
boolean |
Indicates whether the job has been delivered. |
false |
| DeliveryStatus |
string |
Delivery status |
not-requested |
| SessionId |
string |
Associated session ID |
*** |
| RunAtMs |
integer |
Actual execution timestamp (milliseconds) |
1777370544931 |
| DurationMs |
integer |
Execution duration (milliseconds) |
27586 |
| NextRunAtMs |
integer |
Next execution timestamp (milliseconds) |
1777424400000 |
| Model |
string |
Model used |
bailian/qwen3.5-plus |
| Provider |
string |
Model provider |
bailian |
| Usage |
object |
Token usage details |
|
| InputTokens |
integer |
Number of input tokens |
30250 |
| OutputTokens |
integer |
Number of output tokens |
30250 |
| TotalTokens |
integer |
Total number of tokens |
60500 |
| JobName |
string |
Task name |
test |
| Total |
integer |
Total number of tasks |
1 |
Examples
Success response
JSON format
{
"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
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.