所有agent的AGENTS.md添加cron使用说明

This commit is contained in:
2026-03-09 10:05:09 +08:00
parent 0c961c5e5d
commit 22983f8408
75 changed files with 2346 additions and 1643 deletions
+84 -27
View File
@@ -7,7 +7,7 @@
"name": "backup-openclaw-json",
"enabled": true,
"createdAtMs": 1772261581796,
"updatedAtMs": 1772910013043,
"updatedAtMs": 1772996418023,
"schedule": {
"kind": "cron",
"expr": "0 3 * * *",
@@ -23,10 +23,10 @@
"mode": "announce"
},
"state": {
"nextRunAtMs": 1772996400000,
"lastRunAtMs": 1772910000004,
"nextRunAtMs": 1773082800000,
"lastRunAtMs": 1772996400005,
"lastStatus": "ok",
"lastDurationMs": 13039,
"lastDurationMs": 18018,
"consecutiveErrors": 0,
"lastRunStatus": "ok",
"lastDelivered": true,
@@ -39,7 +39,7 @@
"name": "capability-evolver-daily",
"enabled": true,
"createdAtMs": 1772550743528,
"updatedAtMs": 1772881219538,
"updatedAtMs": 1772967715777,
"schedule": {
"kind": "cron",
"expr": "0 19 * * *",
@@ -60,16 +60,16 @@
"to": "feishu-pm"
},
"state": {
"nextRunAtMs": 1772967600000,
"lastRunAtMs": 1772881200004,
"nextRunAtMs": 1773054000000,
"lastRunAtMs": 1772967600004,
"lastStatus": "error",
"lastDurationMs": 19534,
"consecutiveErrors": 2,
"lastDurationMs": 115773,
"consecutiveErrors": 3,
"lastRunStatus": "error",
"lastDeliveryStatus": "not-delivered",
"lastDelivered": false,
"lastDeliveryError": "Unhandled stop reason: network_error",
"runningAtMs": 1772967600002
"lastDeliveryError": "⚠️ ✉️ Message failed",
"lastError": "⚠️ ✉️ Message failed"
}
},
{
@@ -78,7 +78,7 @@
"name": "zq-knowledge-base-sync",
"enabled": true,
"createdAtMs": 1772551807455,
"updatedAtMs": 1772910013044,
"updatedAtMs": 1772996418024,
"schedule": {
"expr": "0 3 * * *",
"kind": "cron",
@@ -91,8 +91,8 @@
"text": "执行知识库同步:bash ~/.openclaw/cron/scripts/zq-sync.sh"
},
"state": {
"nextRunAtMs": 1772996400000,
"lastRunAtMs": 1772910013043,
"nextRunAtMs": 1773082800000,
"lastRunAtMs": 1772996418023,
"lastStatus": "skipped",
"lastDurationMs": 1,
"consecutiveErrors": 0,
@@ -107,7 +107,7 @@
"name": "openclaw-backup",
"enabled": true,
"createdAtMs": 1772552362242,
"updatedAtMs": 1772910013044,
"updatedAtMs": 1772996418024,
"schedule": {
"expr": "0 3 * * *",
"kind": "cron",
@@ -120,8 +120,8 @@
"text": "执行 OpenClaw 备份:bash ~/.openclaw/cron/scripts/git-auto-sync.sh"
},
"state": {
"nextRunAtMs": 1772996400000,
"lastRunAtMs": 1772910013044,
"nextRunAtMs": 1773082800000,
"lastRunAtMs": 1772996418024,
"lastStatus": "skipped",
"lastDurationMs": 0,
"consecutiveErrors": 0,
@@ -137,7 +137,7 @@
"description": "每天早上7点整理与各个 AI 代理的对话记录",
"enabled": true,
"createdAtMs": 1772776369645,
"updatedAtMs": 1772924419184,
"updatedAtMs": 1773010817124,
"schedule": {
"kind": "cron",
"expr": "0 7 * * *",
@@ -155,11 +155,11 @@
"channel": "last"
},
"state": {
"nextRunAtMs": 1773010800000,
"lastRunAtMs": 1772924400006,
"nextRunAtMs": 1773097200000,
"lastRunAtMs": 1773010800003,
"lastRunStatus": "ok",
"lastStatus": "ok",
"lastDurationMs": 19178,
"lastDurationMs": 17121,
"lastDelivered": true,
"lastDeliveryStatus": "delivered",
"consecutiveErrors": 0
@@ -172,7 +172,7 @@
"description": "每天7点同步提醒到CalDAV日历",
"enabled": true,
"createdAtMs": 1772791528528,
"updatedAtMs": 1772924437715,
"updatedAtMs": 1773010833994,
"schedule": {
"kind": "cron",
"expr": "0 7 * * *",
@@ -190,13 +190,70 @@
"channel": "last"
},
"state": {
"nextRunAtMs": 1773010800000,
"lastRunAtMs": 1772924419184,
"nextRunAtMs": 1773097200000,
"lastRunAtMs": 1773010817124,
"lastRunStatus": "ok",
"lastStatus": "ok",
"lastDurationMs": 18531,
"lastDeliveryStatus": "not-requested",
"consecutiveErrors": 0
"lastDurationMs": 16870,
"lastDeliveryStatus": "delivered",
"consecutiveErrors": 0,
"lastDelivered": true
}
},
{
"id": "78b64c2f-7f91-47ff-9250-d13f546eb21f",
"agentId": "ui-designer",
"name": "房价月度监控",
"description": "每月10日执行北京房价监控,生成报告并推送",
"enabled": true,
"createdAtMs": 1772986312298,
"updatedAtMs": 1772986312298,
"schedule": {
"kind": "cron",
"expr": "0 10 10 * *",
"tz": "Asia/Shanghai"
},
"sessionTarget": "isolated",
"wakeMode": "now",
"payload": {
"kind": "agentTurn",
"message": "执行北京房价月度监控任务:1.北京整体均价与成交套数 2.热门小区TOP5 3.140-200㎡单价3-4万成交房源TOP20(全北京+昌平区单独统计)。对比去年同期和上月。报告保存到~/work/zq/30.资源/房价追踪/,同时推送飞书消息。"
},
"delivery": {
"mode": "announce",
"channel": "feishu",
"to": "user:ou_9847ce84b960736c14554730b41e4957"
},
"state": {
"nextRunAtMs": 1773108000000
}
},
{
"id": "daily-review-cleanup",
"agentId": "knowledge-base",
"name": "daily-review-cleanup",
"description": "每天凌晨2:30整理昨天的已完成任务到每日回顾",
"enabled": true,
"createdAtMs": 1741484880000,
"updatedAtMs": 1741484880000,
"schedule": {
"kind": "cron",
"expr": "30 2 * * *",
"tz": "Asia/Shanghai"
},
"sessionTarget": "isolated",
"wakeMode": "now",
"payload": {
"kind": "agentTurn",
"message": "执行每日回顾整理脚本:bash ~/.openclaw/cron/scripts/daily-review.sh\n\n完成后汇报整理结果。",
"timeoutSeconds": 120
},
"delivery": {
"mode": "announce",
"channel": "last"
},
"state": {
"nextRunAtMs": 1773081000000
}
}
]
+82 -27
View File
@@ -7,7 +7,7 @@
"name": "backup-openclaw-json",
"enabled": true,
"createdAtMs": 1772261581796,
"updatedAtMs": 1772910013043,
"updatedAtMs": 1772996418023,
"schedule": {
"kind": "cron",
"expr": "0 3 * * *",
@@ -23,10 +23,10 @@
"mode": "announce"
},
"state": {
"nextRunAtMs": 1772996400000,
"lastRunAtMs": 1772910000004,
"nextRunAtMs": 1773082800000,
"lastRunAtMs": 1772996400005,
"lastStatus": "ok",
"lastDurationMs": 13039,
"lastDurationMs": 18018,
"consecutiveErrors": 0,
"lastRunStatus": "ok",
"lastDelivered": true,
@@ -39,7 +39,7 @@
"name": "capability-evolver-daily",
"enabled": true,
"createdAtMs": 1772550743528,
"updatedAtMs": 1772881219538,
"updatedAtMs": 1772967715777,
"schedule": {
"kind": "cron",
"expr": "0 19 * * *",
@@ -60,16 +60,16 @@
"to": "feishu-pm"
},
"state": {
"nextRunAtMs": 1772967600000,
"lastRunAtMs": 1772881200004,
"nextRunAtMs": 1773054000000,
"lastRunAtMs": 1772967600004,
"lastStatus": "error",
"lastDurationMs": 19534,
"consecutiveErrors": 2,
"lastDurationMs": 115773,
"consecutiveErrors": 3,
"lastRunStatus": "error",
"lastDeliveryStatus": "not-delivered",
"lastError": "Unhandled stop reason: network_error",
"lastDelivered": false,
"lastDeliveryError": "Unhandled stop reason: network_error"
"lastDeliveryError": "⚠️ ✉️ Message failed",
"lastError": "⚠️ ✉️ Message failed"
}
},
{
@@ -78,7 +78,7 @@
"name": "zq-knowledge-base-sync",
"enabled": true,
"createdAtMs": 1772551807455,
"updatedAtMs": 1772910013044,
"updatedAtMs": 1772996418024,
"schedule": {
"expr": "0 3 * * *",
"kind": "cron",
@@ -91,8 +91,8 @@
"text": "执行知识库同步:bash ~/.openclaw/cron/scripts/zq-sync.sh"
},
"state": {
"nextRunAtMs": 1772996400000,
"lastRunAtMs": 1772910013043,
"nextRunAtMs": 1773082800000,
"lastRunAtMs": 1772996418023,
"lastStatus": "skipped",
"lastDurationMs": 1,
"consecutiveErrors": 0,
@@ -107,7 +107,7 @@
"name": "openclaw-backup",
"enabled": true,
"createdAtMs": 1772552362242,
"updatedAtMs": 1772910013044,
"updatedAtMs": 1772996418024,
"schedule": {
"expr": "0 3 * * *",
"kind": "cron",
@@ -120,8 +120,8 @@
"text": "执行 OpenClaw 备份:bash ~/.openclaw/cron/scripts/git-auto-sync.sh"
},
"state": {
"nextRunAtMs": 1772996400000,
"lastRunAtMs": 1772910013044,
"nextRunAtMs": 1773082800000,
"lastRunAtMs": 1772996418024,
"lastStatus": "skipped",
"lastDurationMs": 0,
"consecutiveErrors": 0,
@@ -137,7 +137,7 @@
"description": "每天早上7点整理与各个 AI 代理的对话记录",
"enabled": true,
"createdAtMs": 1772776369645,
"updatedAtMs": 1772924419184,
"updatedAtMs": 1773010817124,
"schedule": {
"kind": "cron",
"expr": "0 7 * * *",
@@ -155,11 +155,11 @@
"channel": "last"
},
"state": {
"nextRunAtMs": 1773010800000,
"lastRunAtMs": 1772924400006,
"nextRunAtMs": 1773097200000,
"lastRunAtMs": 1773010800003,
"lastRunStatus": "ok",
"lastStatus": "ok",
"lastDurationMs": 19178,
"lastDurationMs": 17121,
"lastDelivered": true,
"lastDeliveryStatus": "delivered",
"consecutiveErrors": 0
@@ -172,7 +172,7 @@
"description": "每天7点同步提醒到CalDAV日历",
"enabled": true,
"createdAtMs": 1772791528528,
"updatedAtMs": 1772924437715,
"updatedAtMs": 1773010833994,
"schedule": {
"kind": "cron",
"expr": "0 7 * * *",
@@ -190,14 +190,69 @@
"channel": "last"
},
"state": {
"nextRunAtMs": 1773010800000,
"lastRunAtMs": 1772924419184,
"nextRunAtMs": 1773097200000,
"lastRunAtMs": 1773010817124,
"lastRunStatus": "ok",
"lastStatus": "ok",
"lastDurationMs": 18531,
"lastDeliveryStatus": "not-requested",
"consecutiveErrors": 0
"lastDurationMs": 16870,
"lastDeliveryStatus": "delivered",
"consecutiveErrors": 0,
"lastDelivered": true
}
},
{
"id": "78b64c2f-7f91-47ff-9250-d13f546eb21f",
"agentId": "ui-designer",
"name": "房价月度监控",
"description": "每月10日执行北京房价监控,生成报告并推送",
"enabled": true,
"createdAtMs": 1772986312298,
"updatedAtMs": 1772986312298,
"schedule": {
"kind": "cron",
"expr": "0 10 10 * *",
"tz": "Asia/Shanghai"
},
"sessionTarget": "isolated",
"wakeMode": "now",
"payload": {
"kind": "agentTurn",
"message": "执行北京房价月度监控任务:1.北京整体均价与成交套数 2.热门小区TOP5 3.140-200㎡单价3-4万成交房源TOP20(全北京+昌平区单独统计)。对比去年同期和上月。报告保存到~/work/zq/30.资源/房价追踪/,同时推送飞书消息。"
},
"delivery": {
"mode": "announce",
"channel": "feishu",
"to": "user:ou_9847ce84b960736c14554730b41e4957"
},
"state": {
"nextRunAtMs": 1773108000000
}
},
{
"id": "daily-review-cleanup",
"agentId": "knowledge-base",
"name": "daily-review-cleanup",
"description": "每天凌晨2:30整理昨天的已完成任务到每日回顾",
"enabled": true,
"createdAtMs": 1741484880000,
"updatedAtMs": 1741484880000,
"schedule": {
"kind": "cron",
"expr": "30 2 * * *",
"tz": "Asia/Shanghai"
},
"sessionTarget": "isolated",
"wakeMode": "now",
"payload": {
"kind": "agentTurn",
"message": "执行每日回顾整理脚本:bash ~/.openclaw/cron/scripts/daily-review.sh\n\n完成后汇报整理结果。",
"timeoutSeconds": 120
},
"delivery": {
"mode": "announce",
"channel": "last"
},
"state": {}
}
]
}
+74
View File
@@ -0,0 +1,74 @@
#!/bin/bash
# 每日回顾整理脚本
# 功能:将TODO.md中已完成的任务移动到昨天的每日回顾中
set -e
WORK_DIR="/home/starmen1265/work/zq"
TODO_FILE="$WORK_DIR/01.待办/TODO.md"
REVIEW_DIR="$WORK_DIR/40.归档/每日回顾"
# 获取昨天的日期(格式:YYYY-MM-DD)
YESTERDAY=$(date -d "yesterday" +%Y-%m-%d)
REVIEW_FILE="$REVIEW_DIR/$YESTERDAY.md"
# 切换到工作目录
cd "$WORK_DIR"
# 如果没有已完成的任务,直接退出
if ! grep -q "\[x\]" "$TODO_FILE"; then
echo "No completed tasks found. Exiting."
exit 0
fi
# 提取已完成的任务(保留标题结构)
# 读取TODO.md,提取所有包含[x]的行及其所属标题
COMPLETED_TASKS=$(awk '
/^#/ { current_section = $0 }
/\[x\]/ {
if (current_section != last_section) {
print current_section
last_section = current_section
}
print $0
}
' "$TODO_FILE")
# 如果每日回顾文件不存在,创建它
if [ ! -f "$REVIEW_FILE" ]; then
touch "$REVIEW_FILE"
fi
# 将完成的任务追加到每日回顾文件(去掉✅及后面的日期)
echo "$COMPLETED_TASKS" | sed 's/ ✅ [0-9-]*$//' >> "$REVIEW_FILE"
# 从TODO.md中删除已完成的任务行
sed -i '/\[x\]/d' "$TODO_FILE"
# 清理TODO.md中的空标题(标题下没有任务的情况)
awk '
/^#/ {
if (section_content != "") {
print section_header
print section_content
}
section_header = $0
section_content = ""
next
}
!/^#/ && $0 != "" {
section_content = section_content "\n" $0
}
END {
if (section_content != "") {
print section_header
print section_content
}
}
' "$TODO_FILE" > "$TODO_FILE.tmp" && mv "$TODO_FILE.tmp" "$TODO_FILE"
# 提交git变更
git add "$TODO_FILE" "$REVIEW_DIR/$YESTERDAY.md"
git commit -m "每日回顾整理:$YESTERDAY" || echo "No changes to commit"
echo "Daily review completed for $YESTERDAY"