Skip to content
dongwei6688 edited this page Jul 28, 2026 · 4 revisions

CRON 定时同步

crontab

# 每天早上 7 点同步
0 7 * * * cd ~/.agents/skills/weread-notes-export && python3 scripts/daily_sync_weread.py

Hermes cron

hermes cron create --schedule "0 7 * * *" \
  --prompt "运行每日微信读书笔记同步" \
  --skills weread-notes-export

同步逻辑

  • 只导出最近 48 小时内有更新的书
  • 已有的笔记文件不会被覆盖(除非有更新)
  • 首次使用先跑 --all 全量导出,之后增量即可

注意事项

  • WEREAD_API_KEY 需在 cron 环境中可用,建议写入脚本后 source 加载
  • 输出目录 ~/.weread-notes/ 不存在会自动创建
  • 通过 npx skills add 安装后,skill 实际路径为 ~/.agents/skills/weread-notes-export/

Clone this wiki locally