feat: 多语言任务、WebUI 增强与 Agent MCP 集成

重构 lib 为扁平模块并支持 Windows schtasks;新增 JS/Bash/PowerShell 模板、WebUI 调度编辑,以及 Cursor Skill 与 MCP 工具供 Agent 管理定时任务。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-24 21:45:25 +08:00
parent 6c2db2dfa3
commit c10cacd5c6
59 changed files with 3989 additions and 800 deletions

View File

@@ -9,7 +9,7 @@ from pathlib import Path
sys.path.insert(0, str(Path(__file__).resolve().parent / "lib"))
from shumengya_cron.manager import (
from manager import (
cron_root,
get_context,
iter_task_ids,
@@ -18,7 +18,7 @@ from shumengya_cron.manager import (
set_task_state,
sync_cron_d,
)
from shumengya_cron.runner import task_enabled_text, task_is_enabled
from runner import task_enabled_text, task_is_enabled
CRON_ROOT = cron_root()
@@ -81,7 +81,8 @@ def main(argv: list[str] | None = None) -> int:
try:
if action == "run":
task_rc = run_task(task_id, CRON_ROOT)
print(f"{task_id} (exit={task_rc})")
marker = ">" if sys.platform == "win32" else ""
print(f"{marker} {task_id} (exit={task_rc})")
if task_rc != 0:
rc = task_rc
continue