feat: add cron wrapper scripts for OCG and Kimi local collectors

- ocg_collect.sh: local OCG collection via HTTP+cookies
- kimi_collect_local.sh: local Kimi collection via Playwright CDP
- Replaces kimi_collect.sh (SSH-to-Windows approach)
This commit is contained in:
hmo
2026-07-21 01:00:58 +08:00
parent c11222e55c
commit 37bfbad921
2 changed files with 24 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
#!/usr/bin/env bash
# Kimi usage collector (local Playwright, no SSH needed)
# Called from crontab (every 10 min)
set -euo pipefail
LOG="/home/hmo/AgentsMeeting/gateway/logs/kimi_collect.log"
SCRIPT="/home/hmo/AgentsMeeting/gateway/scripts/usage_collector_kimi_local.py"
PY="/home/hmo/agentsmeeting-venv/bin/python3"
echo "[$(date '+%Y-%m-%d %H:%M:%S')] Starting local Kimi collection..." >> "$LOG"
"$PY" "$SCRIPT" >> "$LOG" 2>&1
echo "[$(date '+%Y-%m-%d %H:%M:%S')] Done (rc=$?)" >> "$LOG"
+12
View File
@@ -0,0 +1,12 @@
#!/usr/bin/env bash
# OCG usage collector (local, no SSH needed)
# Called from crontab
set -euo pipefail
LOG="/home/hmo/AgentsMeeting/gateway/logs/ocg_collect.log"
SCRIPT="/home/hmo/AgentsMeeting/gateway/scripts/usage_collector.py"
PY="/home/hmo/agentsmeeting-venv/bin/python3"
echo "[$(date '+%Y-%m-%d %H:%M:%S')] Starting OCG collection..." >> "$LOG"
"$PY" "$SCRIPT" >> "$LOG" 2>&1
echo "[$(date '+%Y-%m-%d %H:%M:%S')] Done (rc=$?)" >> "$LOG"