根因:crontab 实际运行的是旧脚本 scripts/sync_lark_group_to_mysql.py, 该脚本 INSERT 语句缺少 quote_message_id/parent_id/root_id 字段。 而 skills/feishu-group-msg-sync/scripts/sync_group_to_mysql.py 已支持 但未被 crontab 正确引用。 修复内容: 1. run_lark_group_sync.sh 改为调用新版脚本 2. 同步状态文件对齐,避免漏消息 3. 移除重复的 crontab 条目,避免双写冲突 4. 回填历史数据(1条消息成功补全引用关系)
13 lines
535 B
Bash
Executable File
13 lines
535 B
Bash
Executable File
#!/bin/bash
|
||
# 飞书群消息同步到MySQL - 定时执行脚本
|
||
# crontab: 每4小时执行一次
|
||
# 0 */4 * * * /root/.openclaw/workspace-xiaokui/scripts/run_lark_group_sync.sh >> /var/log/lark_group_sync.log 2>&1
|
||
#
|
||
# 2026-04-24 修复:改用新版脚本(支持 quote_message_id / parent_id / root_id)
|
||
# 旧脚本 scripts/sync_lark_group_to_mysql.py 不再使用
|
||
|
||
export PATH="/root/.nvm/versions/node/v24.14.0/bin:$PATH"
|
||
|
||
cd /root/.openclaw/workspace-xiaokui
|
||
python3 skills/feishu-group-msg-sync/scripts/sync_group_to_mysql.py
|