taskmanager/.claude/commands/gitea/stop-scheduler.md
bojunC 3af9fa58e7 feat(scheduler): 修改定时任务为子Agent模式
- 使用 Agent 工具启动独立子Agent处理任务
- 子Agent完成后自动退出,等待下次触发
- 提高系统稳定性和资源管理
- 添加实施计划和模块文档
2026-03-19 17:34:56 +08:00

56 lines
1.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
name: gitea-stop-scheduler
description: 停止所有定时任务
---
停止正在运行的定时任务。
## 工作流程
### 第一步:列出所有定时任务
使用 CronList 获取所有当前运行的定时任务。
### 第二步:停止所有任务
对每个任务使用 CronDelete 停止它。
### 第三步:确认停止
显示已停止的任务列表。
## 示例输出
```
⏹️ 停止定时任务
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📋 正在运行的定时任务:
• job-abc123 (Code Agent)
• job-def456 (PR Agent)
✅ 已停止任务:
• job-abc123 - Code Agent
• job-def456 - PR Agent
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✨ 所有定时任务已停止!
💡 提示:
• 使用 /gitea-start-scheduler 重新启动
• 任务状态不会保存,需要重新创建
```
## 注意事项
1. **不可恢复**: 停止后无法恢复,需要重新创建定时任务
2. **正在运行的子Agent**: 如果有子Agent正在工作它不会立即停止而是完成当前任务后自动退出
3. **清理**: 停止任务不会删除已创建的代码或 PRs
4. **子Agent模式**: 定时任务使用子Agent模式运行停止定时任务不影响已启动的子Agent
## 相关命令
- `/gitea-start-scheduler` - 启动定时任务
- `/gitea-status` - 查看任务状态