适合定时任务
批量审查、生成结构化报告、检查文档漂移、分析日志、定期跑本地站点检查。
进阶任务
定时任务不是把 Codex 放开让它自己跑,而是把稳定任务封装成受控输入、受控权限、结构化输出和明确失败策略。适合定时运行的任务,必须先能在普通任务中人工跑通。
批量审查、生成结构化报告、检查文档漂移、分析日志、定期跑本地站点检查。
对 Git 仓库中的重复任务使用独立后台 worktree,避免直接污染未完成的本地工作区。
稳定输入输出的仓库任务,例如生成索引、检查链接、归档实验结果。
打开 Scheduled,选择新建任务;结果与历次运行也在 Scheduled 视图查看。项目任务只有在机器开机且 ChatGPT desktop app 正在运行时才能执行。
任务:检查文档命令是否与仓库脚本一致
Schedule:每周一 09:00(Asia/Shanghai)
上下文:继续当前任务 / 独立任务
环境:Local / 新 worktree
模型与推理:按任务复杂度选择
权限:默认 sandbox;禁止外部写入
输出:文件、证据、风险、下一步
停止条件:命令失败、需要 secret 或范围不明时停止定时任务提示词:
Review this diff for missing tests.
Output JSONL with fields:
severity, file, finding, evidence, recommendation.
Do not edit files.定时任务提示词:
Read the latest failure log and explain root cause.
Return:
- failing command
- likely cause
- minimal fix
- whether local reproduction is needed.定时任务提示词:
Compare README, AGENTS.md, and project scripts.
Report stale commands, missing setup steps, and risky assumptions.
Do not modify files.能只读就只读;能限定目录就限定目录;需要网络时说明访问目标。
优先 JSONL、表格或固定字段,避免自动化结果无法被脚本和人复核。
涉及写文件、发布、PR comment、外部系统写入时保留人工确认点。
权限失败、测试失败、上下文缺失、网络不可达时不要继续猜测执行。
不要在无人值守的 Scheduled tasks 中运行 /lfg,也不要调用任何会自动 commit、push、打开 PR 或反复修复 CI 的 skill。仓库应启用 protected branch,任务使用最小权限;任何写入、提交与发布结果都必须由人审查,merge 只由人执行。
定时任务模板:
Input:
- repo/path:
- target files:
- task type:
Permission:
- read:
- write:
- network:
- external systems:
Output:
- format:
- required fields:
- artifact path:
Stop:
- missing context
- command failure
- ambiguous requirement
- unsafe permission request