技能 效率工具 Cron 定时任务调度

Cron 定时任务调度

v20261020
cron-schedule
使用 CronCreate 和五字段 cron 表达式,调度持久的会话内后台工作器,按固定时钟执行安全审计、性能优化、记忆整合和代码库映射;会话结束后仍需运行的任务可改用系统调度器。
获取技能
473 次下载
概览

Use CronCreate for a worker that should fire on a clock while this Claude Code session is open:

CronCreate({ cron: "*/15 * * * *", prompt: "Dispatch the audit worker with mcp__plugin_ruflo-core_ruflo__hooks_worker-dispatch({ trigger: \"audit\" }) and report anything critical", recurring: true })

The parameters are cron (five-field expression), prompt and recurring. A schedule: field does not exist. These jobs live in the session: they stop when you close it, and recurring jobs expire on their own after 7 days. Cancel one sooner with CronDelete (find its id with CronList). For a worker that must keep running after the session ends, use /schedule (cloud routines) or an OS scheduler (cron, systemd timer) that calls npx @claude-flow/cli@latest hooks worker dispatch --trigger audit.

Recommended Schedules

WorkerCronDescription
audit*/15 * * * *Security scanning
optimize*/30 * * * *Performance optimization
consolidate0 * * * *Memory consolidation
map*/30 * * * *Codebase mapping
testgaps*/15 * * * *Test coverage analysis
document0 */2 * * *API documentation

When to Use Cron vs Loop

  • /loop: In-session, self-pacing. Use for active development.
  • CronCreate: In-session, fixed clock, auto-expires after 7 days. Use for regular checks while you work.
  • /schedule or an OS scheduler: Survives the session. Use for CI-style monitoring.
信息
分类 效率工具
名称 cron-schedule
版本 v20261020
大小 1.71KB
更新时间 2026-10-21
语言