Cron Scheduler Pro Free
本地优先的定时任务调度引擎免费版,支持每日/每周/每月/间隔四种调度模式与任务生命周期管理。
от thcjp610 установок в других каталогах
Установить Cron Scheduler Pro Free в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
将重复性意图转化为可信赖的执行契约。本地优先,隐私安全,四种调度模式。
重复的任务只需配置一次,然后放心交给调度引擎执行。本技能提供本地优先的定时任务调度框架,支持每日、每周、每月、间隔四种调度模式,配合完整的任务生命周期管理,让Agent按计划自动执行。
架构总览
┌─────────────────────────────────────────────────┐
│ 定时调度引擎 (免费版) │
├─────────────────────────────────────────────────┤
│ │
│ ┌────────────────────────────────────────┐ │
│ │ 调度模式层 │ │
│ │ ┌──────┐ ┌──────┐ ┌──────┐ ┌──────┐ │ │
│ │ │ 每日 │ │ 每周 │ │ 每月 │ │ 间隔 │ │ │
│ │ │ daily│ │weekly│ │monthly│ │interval│ │ │
│ │ └──────┘ └──────┘ └──────┘ └──────┘ │ │
│ └────────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ ┌────────────────────────────────────────┐ │
│ │ 任务管理层 │ │
│ │ 创建 → 激活 → 暂停 → 恢复 → 归档 │ │
│ │ active paused archived │ │
│ └────────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ ┌────────────────────────────────────────┐ │
│ │ 持久化存储层 │ │
│ │ jobs.json │ runs.json │ stats │ │
│ │ (任务定义) │ (执行历史) │ (统计) │ │
│ └────────────────────────────────────────┘ │
└─────────────────────────────────────────────────┘
快速开始
- 阅读## 核心能力章节了解skill功能
- 按## 依赖说明配置环境
- 执行所需能力对应的命令
- 参考## 错误处理章节处理异常
- 查看## FAQ解答常见疑问
30秒上手(创建第一个任务)
python3 --version
import json
from pathlib import Path
from datetime import datetime, timedelta
STORE_DIR = Path.home() / "workspace" / "scheduler" / "cron"
STORE_DIR.mkdir(parents=True, exist_ok=True)
JOBS_FILE = STORE_DIR / "jobs.json"
if not JOBS_FILE.exists():
JOBS_FILE.write_text("[]", encoding="utf-8")
def add_job(name, schedule_type, schedule_config, task_desc):
"""添加定时任务"""
jobs = json.loads(JOBS_FILE.read_text(encoding="utf-8"))
job = {
"id": f"job_{len(jobs) + 1:04d}",
"name": name,
"schedule_type": schedule_type, # daily/weekly/monthly/interval
"schedule_config": schedule_config,
"task": task_desc,
"status": "active",
"created_at": datetime.now().isoformat(),
"next_run": None # 待计算
}
jobs.append(job)
JOBS_FILE.write_text(json.dumps(jobs, ensure_ascii=False, indent=2), encoding="utf-8")
print(f"任务已创建:{job['id']} - {job['name']}")
return job
add_job(
name="每日晨报",
schedule_type="daily",
schedule_config={"time": "08:00"},
task_desc="生成每日工作晨报,包含待办事项和日程提醒"
)
add_job(
name="API健康检查",
schedule_type="interval",
schedule_config={"every_minutes": 30},
task_desc="检查API端点健康状态,异常时通知"
)
120秒标准搭建
配置完整的任务管理流程:
详细代码示例已移至
references/detail.md
300秒完整配置
配置执行历史记录与任务查看:
from datetime import datetime
import json
class FullScheduler(CronScheduler):
"""带执行历史的完整调度器"""
def record_run(self, job_id, status, result=""):
"""记录执行历史"""
runs = json.loads(self.runs_file.read_text(encoding="utf-8"))
run = {
"job_id": job_id,
"run_time": datetime.now().isoformat(),
"status": status, # success / failed / skipped
"result": result
}
runs.append(run)
self.runs_file.write_text(
json.dumps(runs, ensure_ascii=False, indent=2), encoding="utf-8")
jobs = self._load_jobs()
for j in jobs:
if j["id"] == job_id:
j["last_run"] = run["run_time"]
if j["status"] == "active":
j["next_run"] = self._calc_next_run(
j["schedule_type"], j["schedule_config"])
break
self._save_jobs(jobs)
def get_run_history(self, job_id=None, limit=20):
"""查看执行历史"""
runs = json.loads(self.runs_file.read_text(encoding="utf-8"))
if job_id:
runs = [r for r in runs if r["job_id"] == job_id]
runs = runs[-limit:]
print(f"\n{'任务ID':<12} {'执行时间':<26} {'状态':<10} {'结果':<30}")
print("-" * 80)
for r in runs:
print(f"{r['job_id']:<12} {r['run_time']:<26} "
f"{r['status']:<10} {r['result'][:30]}")
return runs
def get_next_runs(self, limit=5):
"""查看接下来要执行的任务"""
jobs = self._load_jobs()
active = [j for j in jobs if j["status"] == "active" and j.get("next_run")]
active.sort(key=lambda j: j["next_run"])
print(f"\n接下来 {min(limit, len(active))} 个待执行任务:")
print(f"{'ID':<12} {'名称':<16} {'执行时间':<26} {'任务描述':<30}")
print("-" * 80)
for j in active[:limit]:
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
- 01
read - 02
exec
FAQ
Что делает скилл Cron Scheduler Pro Free?
本地优先的定时任务调度引擎免费版,支持每日/每周/每月/间隔四种调度模式与任务生命周期管理。
Как установить скилл Cron Scheduler Pro Free?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл Cron Scheduler Pro Free запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
AnthropicToolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
access
AnthropicManage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
configure
AnthropicSet up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
access
AnthropicManage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…