搜索

PythonReactSEOPDF
GitHub Skill

hub-ops

Manage claude-code-feishu service operations — cron jobs (定时任务/计划任务), scheduler reload, service status. Use when the user asks about scheduled tasks, periodic jobs, adding/removing/enabling cron jobs, checking service status, reloading configuration, or mentions 定时任务、计划任务、cron、调度、服务状态.

MidnightV1☆ 10 仓库 Stars2 仓库 Forks

安装与使用

请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。

查看来源 ↗使用指南

技能说明

Hub Operations

You are running inside nas-claude-hub as a Claude CLI subprocess. Use the hub_ctl.py script to manage hub operations. Never run hub.sh restart or hub.sh stop directly — that would kill your own parent process.

Tool

python3 .claude/skills/hub-ops/scripts/hub_ctl.py <command> [args]

Available Commands

Cron Job Management
# List all jobs
python3 .claude/skills/hub-ops/scripts/hub_ctl.py cron list

# Add a handler job (e.g. briefing pipeline)
python3 .claude/skills/hub-ops/scripts/hub_ctl.py cron add "daily-briefing" "0 8 * * *" --handler briefing

# Add a prompt job (LLM-routed)
python3 .claude/skills/hub-ops/scripts/hub_ctl.py cron add "weekly-summary" "0 9 * * 1" --prompt "Summarize this week" --model claude-cli/sonnet

# Remove a job (prefix match on ID)
python3 .claude/skills/hub-ops/scripts/hub_ctl.py cron remove abc123

# Enable/disable a job
python3 .claude/skills/hub-ops/scripts/hub_ctl.py cron enable abc123
python3 .claude/skills/hub-ops/scripts/hub_ctl.py cron disable abc123

# Show job details
python3 .claude/skills/hub-ops/scripts/hub_ctl.py cron show abc123
Schedule Formats
Format Example Meaning
Cron "0 8 * * *" Daily at 08:00
Cron "*/30 * * * *" Every 30 minutes
Interval 30m Every 30 minutes
One-shot 2026-03-02T15:00 Once at specific time

All times use Asia/Shanghai timezone.

Service Status & Reload
# Check if hub is running
python3 .claude/skills/hub-ops/scripts/hub_ctl.py status

# Trigger hot-reload (after external changes to jobs.json)
python3 .claude/skills/hub-ops/scripts/hub_ctl.py reload

Registered Handlers

Handler Description Managed by
briefing Daily briefing pipeline — default domain (subprocess) BriefingPlugin
briefing:<domain> Per-domain briefing pipeline (auto-discovered) BriefingPlugin

Handler jobs don't need a prompt — they spawn scripts/briefing_run.py as subprocess.

What Requires Restart vs Not

Change Needs restart?
Cron jobs (add/remove/enable/disable) No — hub_ctl.py auto-reloads
sources.yaml (briefing search terms) No — collector reads fresh each run
scripts/briefing_run.py (pipeline logic) No — runs as subprocess
HEARTBEAT.md No — read fresh each heartbeat cycle
config.yaml (credentials, LLM defaults) Yes — tell user to run hub.sh restart
Hub Python code (main.py, feishu_bot.py) Yes — tell user to run hub.sh restart
Python dependencies Yes — tell user to run hub.sh restart

When restart IS needed, tell the user: "Service restart needed because [reason]. Please run: hub.sh restart"

使用示例

查看来源仓库中的使用示例与配置说明。

查看来源 ↗

来源历史

收录时间
2026-03-11
索引更新时间
2026-03-11
Branch
main

收录与同步日期属于本站记录。源码修改历史请查看来源仓库。

GitHub ↗

chat Comments (0)

chat_bubble_outline

No comments yet. Be the first to share your thoughts!