feat: init sproutclaw-cron 定时任务管理框架
- 每任务一目录结构,统一开关与日志 - cronctl CLI:enable/disable/toggle/status/run/sync-cron - 公共库 lib/shumengya_cron:runner/manager/notify/ssh - _template 示例任务(hello world + 复制模板) - webui 管理面板:FastAPI 后端 + 文档式响应式前端
This commit is contained in:
16
webui/start.sh
Normal file
16
webui/start.sh
Normal file
@@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
BACKEND="$ROOT/webui/backend"
|
||||
VENV="$BACKEND/.venv"
|
||||
|
||||
if [[ ! -d "$VENV" ]]; then
|
||||
python3 -m venv "$VENV"
|
||||
"$VENV/bin/pip" install -r "$BACKEND/requirements.txt"
|
||||
fi
|
||||
|
||||
HOST="${SPROUTCLAW_CRON_WEB_HOST:-0.0.0.0}"
|
||||
PORT="${SPROUTCLAW_CRON_WEB_PORT:-8765}"
|
||||
|
||||
exec "$VENV/bin/uvicorn" main:app --app-dir "$BACKEND" --host "$HOST" --port "$PORT"
|
||||
Reference in New Issue
Block a user