From 9bfb620cea7b0b3ff120e8f547d7c312c2164fb0 Mon Sep 17 00:00:00 2001 From: Yanxin Lu Date: Tue, 24 Mar 2026 12:46:30 -0700 Subject: [PATCH] docs: update MEMORY.md and TOOLS.md for cron fix and cleanup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Update backup section to reflect systemEvent fix (2026-03-24) - Remove ephemeral "今日处理" snapshot from MEMORY.md - Remove dead News Digest section from TOOLS.md - Add OpenClaw Cron reference section to TOOLS.md --- MEMORY.md | 20 ++++++++++---------- TOOLS.md | 32 +++++++++++++++++--------------- 2 files changed, 27 insertions(+), 25 deletions(-) diff --git a/MEMORY.md b/MEMORY.md index e794b28..567f03a 100644 --- a/MEMORY.md +++ b/MEMORY.md @@ -55,21 +55,21 @@ _这份文件记录持续性项目和重要状态,跨会话保留。_ **Tag 分类(14个)**: receipt, billing, shipping, promotion, newsletter, security, social, reminder, confirmation, alert, personal, account, subscription, travel -**今日处理**: 10封邮件,用户决策6次 delete、4次 keep,系统正在学习中 - --- ### 2. 工作区自动备份 -**状态**: 运行中 -**创建**: 2026-03-06 -**更新**: 2026-03-12(移除脚本,改用直接 git 命令) +**状态**: 运行中 +**创建**: 2026-03-06 +**更新**: 2026-03-24(修复:agentTurn → systemEvent) **配置**: -- Cron: 每天 00:00(PST) -- 命令: `git add -A && git commit -m "auto: $(date)" && git push` +- Cron ID: `53c0b2a6-e3b3-4a1d-b2a8-66e216fad753` +- Schedule: 每天 00:00(PST) +- Target: `main` session(通过 heartbeat 触发) +- Payload: `systemEvent` 直接执行 shell - 远程: `ssh://git@luyanxin.com:8103/lyx/youlu-openclaw-workspace.git` -**功能**: -- 自动提交所有变更到 git +**功能**: +- 自动提交所有变更到 git(包括未追踪文件) - 自动推送到 origin/main,**无需确认** - 无变更时静默(无通知) - 仅出错时报告 @@ -106,4 +106,4 @@ _这份文件记录持续性项目和重要状态,跨会话保留。_ --- -_最后更新: 2026-03-22_ +_最后更新: 2026-03-24_ diff --git a/TOOLS.md b/TOOLS.md index 03005bc..fb121df 100644 --- a/TOOLS.md +++ b/TOOLS.md @@ -43,21 +43,6 @@ himalaya message write # 写新邮件(交互式) - **youlu@luyanxin.com → mail@luyx.org**: 直接发送,无需确认(用户 SimpleLogin 别名) - 其他所有对外邮件: 仍需确认 -### ~~News Digest 新闻摘要~~ (已停用) - -~~**自动任务(Cron + Subagent):**~~ -~~- 时间:每天早上 5:00 AM (PST)~~ -~~- Cron ID: `cc95dcf3-0d6c-44f4-90af-76b836ca0c87`~~ - -~~**本地配置:**~~ -~~- 目录:`~/.openclaw/workspace/scripts/news_digest/`~~ -~~- 主脚本:`send_digest.py`~~ -~~- 配置:`config.json`~~ -~~- 数据库:`news_digest.db`~~ -~~- 日志:`news_digest.log`~~ - -**注:** Cron 任务已删除。如需重新启用,需手动创建新的 cron 任务。 - ### 🌐 网页操作 - 工具选择决策表 | 场景 | 首选 | 次选 | @@ -155,6 +140,23 @@ khal list today 7d **同步**: 发送/回复/待办变更后自动 `vdirsyncer sync`,心跳也会定期同步 **注意**: 发送日历邀请属于对外邮件,需先确认 +### OpenClaw Cron 定时任务 + +**规则**: 确定性 shell 任务用 `systemEvent`,需要 LLM 判断的用 `agentTurn` + +```bash +# systemEvent 直接执行(不走 LLM) +openclaw cron edit --session main \ + --system-event 'exec:cd /path && command' + +# 查看/测试 +openclaw cron list +openclaw cron runs --id +openclaw cron run # 立即触发 +``` + +**注意**: kimi-k2.5 工具使用弱,`agentTurn` 容易产生"已完成"幻觉。详见 MEMORY.md 2026-03-24 备份修复记录。 + --- Add whatever helps you do your job. This is your cheat sheet.