Files
my-project/config/openclaw/scripts/auto_retrospective.sh
T

20 lines
654 B
Bash
Executable File

#!/bin/bash
# 经验复盘自动化脚本
LOG_DIR="/root/.openclaw/logs"
DOCS_DIR="/root/.openclaw/logs"
DATE=$(date '+%Y-%m-%d')
# 1. 收集今日问题
echo "=== 自动复盘 - $DATE ===" > $DOCS_DIR/auto_retrospective_$DATE.md
# 2. 统计任务执行
echo "## 任务执行统计" >> $DOCS_DIR/auto_retrospective_$DATE.md
grep -c "✅" $LOG_DIR/*dododo.log 2>/dev/null >> $DOCS_DIR/auto_retrospective_$DATE.md
# 3. 检查错误
echo "## 错误统计" >> $DOCS_DIR/auto_retrospective_$DATE.md
grep -c "ERROR" $LOG_DIR/*dododo.log 2>/dev/null >> $DOCS_DIR/auto_retrospective_$DATE.md
echo "自动复盘完成: $DOCS_DIR/auto_retrospective_$DATE.md"