跳到主要内容

cron 精选

仅在需要未来定时执行或周期执行任务时,使用本 skill。使用 qwenpaw cron list/create/get/state/update/pause/resume/delete/run 管理任务,并始终显式传入 --agent-id。

自动化 Codex CLIMCP 客户端 Apache-2.0 3.6 万
在 GitHub 打开

安装方式

cp -r src/qwenpaw/agents/skills/cron-zh ~/.claude/skills/cron-zh

把该 skill 目录放进客户端 skills 目录。不同客户端的目录可能不同,Claude Code 默认是 ~/.claude/skills/

整仓一次性获取:git clone --depth 1 https://github.com/agentscope-ai/QwenPaw.git

依赖与权限

  • 无需 API Key
  • 无需联网
  • 无外部命令依赖
  • 以上为按正文与 frontmatter 自动推断的信号,仅供参考;安装前建议先阅读原文。

SKILL.md 正文

来源 agentscope-ai/QwenPaw@02b6a6d · 许可 Apache-2.0 · 内容未修改

定时任务管理

什么时候用

只有在需要未来某个时间自动执行,或按周期重复执行时,使用本 skill。

应该使用

  • 用户要求"每天 / 每周 / 每小时"执行某事
  • 用户要求"明天 9 点 / 下周一 / 某个时间"自动提醒或执行
  • 需要长期周期性通知、检查、汇报

不应使用

  • 只是要现在立即执行一次
  • 只是当前会话中的正常回复
  • 用户没有明确执行时间或周期
  • 目标 channel / user / session 还不明确

决策规则

  1. 只有在未来定时执行或周期执行时才使用 cron
  2. 如果只是立即做一次,通常不要创建 cron
  3. 创建前必须确认执行时间/周期、目标 channel、target-user、target-session
  4. 所有 cron 命令都必须显式传 --agent-id
  5. 不要依赖默认 agent,否则任务可能落到 default workspace
  6. 如果 agent 任务只需后台执行、不向渠道输出,添加 --silent;执行、会话历史、追踪和可选收件箱记录仍会继续
  7. 迁入任务的 requires_review 未清除时,不得运行或恢复;必须先在 Console 中完成人工复核和批准

硬规则

必须显式指定 --agent-id

所有 qwenpaw cron 命令都必须传:

--agent-id <your_agent_id>

你的 agent_id 在系统提示中的 Agent Identity 部分(Your agent id is ...)。

不得省略,否则任务可能错误创建到 default agent 的 workspace。


常用命令

# 列出任务
qwenpaw cron list --agent-id <agent_id>

# 查看任务详情
qwenpaw cron get <job_id> --agent-id <agent_id>

# 查看任务状态
qwenpaw cron state <job_id> --agent-id <agent_id>

# 创建任务
qwenpaw cron create --agent-id <agent_id> ...

# 删除任务
qwenpaw cron delete <job_id> --agent-id <agent_id>

# 暂停 / 恢复任务
qwenpaw cron pause <job_id> --agent-id <agent_id>
qwenpaw cron resume <job_id> --agent-id <agent_id>

# 立即执行一次已有任务
qwenpaw cron run <job_id> --agent-id <agent_id>

# 更新已有任务
qwenpaw cron update <job_id> --agent-id <agent_id> ...

创建任务

支持两种类型:

  • text:定时发送固定消息
  • agent:定时向 agent 提问,并把回复发送到目标 channel

支持两种调度形态:

  • cron(--schedule-type cron):经典 cron 周期(如每天 9 点、每 2 小时),与循环任务相对应
  • scheduled(--schedule-type scheduled):日程任务(从 --run-at 开始,可一次性或按天重复)

调度选择规则(必须遵守)

  • 用户表达“每小时/每天/每周”且不强调具体起始日时,优先用 cron
  • 用户表达“明天/下周一/从某天开始/未来两周/有明确截止时间”时,优先用 scheduled
  • scheduled 不重复时(即一次性任务):只传 --run-at,不要传 --repeat-*
  • scheduled 重复时:传 --repeat-every-days,并根据结束条件传:
  • 限定次数:--repeat-end-type count --repeat-count N
  • 限定结束时间:--repeat-end-type until --repeat-until <ISO8601>
  • 不设结束:--repeat-end-type never

超时设置

默认超时 120 秒(2 分钟)。对于较长的 agent 任务,应显式设置更大的超时时间,避免任务被提前取消:

--timeout 600   # 10 分钟
--timeout 3600   # 1 小时

核心规则:

  1. 如果 agent 任务涉及联网搜索、代码执行或多步工具调用,建议设置 --timeout 600 或更高
  2. timeout 必须小于调度周期,避免前一次执行未完成时下一次已触发,导致任务重叠运行。例如:
  • 每 15 分钟执行:--timeout 不应超过 900 秒
  • 每 10 分钟执行:--timeout 建议不超过间隔的 80%(即 480 秒)
  • 每天执行:--timeout 可以设置较大,不需要特别限制
  1. 对于高频任务(间隔 ≤ 10 分钟),遵循 timeout ≤ 调度间隔的 80%;低频任务(每小时及以上)按实际需要设置即可

创建前最少要确认

  • --type
  • --name
  • --schedule-type
  • --cron(当 --schedule-type cron)
  • --run-at(当 --schedule-type scheduled)
  • --channel
  • --target-user
  • --target-session
  • --text
  • --agent-id
  • --timeout(对于 agent 类型任务,根据预期执行时间设置合适的超时)

如果缺少这些信息,应先向用户确认,再创建任务。

创建示例

# 循环任务(对应 --schedule-type cron)
qwenpaw cron create \
  --agent-id <agent_id> \
  --type text \
  --schedule-type cron \
  --name "每日早安" \
  --cron "0 9 * * *" \
  --channel imessage \
  --target-user "CHANGEME" \
  --target-session "CHANGEME" \
  --text "早上好!"
# 循环任务(对应 --schedule-type cron)
qwenpaw cron create \
  --agent-id <agent_id> \
  --type agent \
  --schedule-type cron \
  --name "检查待办" \
  --cron "0 */2 * * *" \
  --channel dingtalk \
  --target-user "CHANGEME" \
  --target-session "CHANGEME" \
  --text "我有什么待办事项?" \
  --timeout 600

如果是后台 agent 任务,可在上面的命令中添加 --silent。text 任务不能使用该参数。

# 日程一次性:明天 9 点提醒(不重复)
qwenpaw cron create \
  --agent-id <agent_id> \
  --type text \
  --schedule-type scheduled \
  --name "明早提醒" \
  --run-at "2026-05-13T09:00:00+08:00" \
  --channel dingtalk \
  --target-user "CHANGEME" \
  --target-session "CHANGEME" \
  --text "9 点开组会" \
  --save-result-to-inbox
# 日程重复:未来两周每天 9 点(共 14 次)
qwenpaw cron create \
  --agent-id <agent_id> \
  --type text \
  --schedule-type scheduled \
  --name "未来两周组会提醒" \
  --run-at "2026-05-13T09:00:00+08:00" \
  --repeat-every-days 1 \
  --repeat-end-type count \
  --repeat-count 14 \
  --channel dingtalk \
  --target-user "CHANGEME" \
  --target-session "CHANGEME" \
  --text "9 点开组会" \
  --save-result-to-inbox

从 JSON 创建

qwenpaw cron create --agent-id <agent_id> -f job_spec.json

最小工作流

1. 判断是否真的是"未来定时"或"周期执行"
2. 确认执行时间/周期
3. 确认 channel、target-user、target-session
4. 显式带上 --agent-id
5. qwenpaw cron create 创建任务
6. 后续用 list / state / pause / resume / delete 管理

迁入任务的复核流程

通过 PawPort 导入的定时任务默认禁用,并带有不可绕过的审核门。

请在 Console 的定时任务页面中检查并批准迁入任务。批准只记录审核结果,任务仍保持禁用;仅在用户明确要求时,再在该页面中单独启用。


Cron 表达式示例

0 9 * * *      每天 9:00
0 */2 * * *    每 2 小时
30 8 * * 1-5   工作日 8:30
0 0 * * 0      每周日零点
*/15 * * * *   每 15 分钟

常见错误

错误 1:把一次性立即执行当成 cron

如果只是现在执行一次,通常不要创建 cron。

错误 2:没传 --agent-id

这会导致任务落到错误的 agent / workspace。所有 cron 命令都必须显式传 --agent-id。

错误 3:信息没补全就创建

如果用户没说明时间、周期、目标 channel 或目标 session,应先追问。

错误 4:操作已有任务前不先查

暂停、恢复、删除前,先用:

qwenpaw cron list --agent-id <agent_id>

找到正确的 job_id。


使用建议

  • 缺少参数时,先问用户再创建
  • 修改/暂停/删除前,先 qwenpaw cron list --agent-id <agent_id>
  • 排查问题时,用 qwenpaw cron state <job_id> --agent-id <agent_id>
  • 给用户展示命令时,提供完整、可直接复制的版本
  • 用户提到“结果进收件箱/不进收件箱”时,显式加 --save-result-to-inbox 或 --no-save-result-to-inbox,否则不要添加该项。
  • 用户要求后台或静默执行且不向渠道回复时,对 agent 任务添加 --silent。

帮助信息

qwenpaw cron -h
qwenpaw cron list -h
qwenpaw cron create -h
qwenpaw cron get -h
qwenpaw cron state -h
qwenpaw cron pause -h
qwenpaw cron resume -h
qwenpaw cron delete -h
qwenpaw cron run -h

质量与来源

所属仓库
agentscope-ai/QwenPaw
仓库星标
3.6 万
最近更新
今天
采集时间
今天
commit
02b6a6d088e3
内容指纹
sha256:10769d2d67eff8d
文件路径
src/qwenpaw/agents/skills/cron-zh/SKILL.md

同仓库其它 Skill

查看全部 48 个
edu-math-tutorial
数学题分步讲解视频的领域知识。适用场景:(1) 用户给出一道数学题并要求做讲解/ 解题视频;(2) 用户说"讲解这道题"、"生成解题视频"、"make a math tutorial"; (3) 需要中文数学教学视频,涉及方程、公式或几何图形。本 skill 只提供领域 知识(题目拆解、讲解节奏、旁白文案规范、版式与 KaTeX 排版风格);画面、 配音与成片一律用 Creator 原生 Element 与工具从源头构建。
精选 agentscope-ai/QwenPaw 3.6 万 原文
Codex CLIMCP 客户端
professional-media-prompts
为 Creator 编译制作级视觉资产图、电影分镜图和参考生视频 Prompt。适用于 角色身份板/设定图、关键帧或多宫格分镜、短片动作节拍、R2V/I2V/T2V 提示词, 尤其适合要求角色一致性、镜头语言、参考图职责、Seedance 时间段或声音设计的 任务。不用于纯素材剪辑、只查询模型参数,或只评价已经生成的成片。
精选 agentscope-ai/QwenPaw 3.6 万 原文
Codex CLIMCP 客户端
visual-asset-design
为角色/场景/道具设计视觉资产、编写或修复 VisualVariant 与阵容图的生成 Prompt 时使用。涵盖参考图布局(艺术身份板/序列关键帧/环境研究板/道具研究 板)、构图与镜头语言、图片审核误判规避、实体 continuity 与以主图为参考 的跨 Variant 衍生设计。不用于视频 Prompt 编译(见 professional-media-prompts)、 纯素材剪辑或只评价已生成产物。
精选 agentscope-ai/QwenPaw 3.6 万 原文
Codex CLIMCP 客户端
alicloud_cli
阿里云 CLI 中文文档镜像检索与命令辅助:先走章节索引,再下钻正文页面,给出命令前必须有本地文档证据。
精选 agentscope-ai/QwenPaw 3.6 万 原文
Codex CLIMCP 客户端
terraform-cli-setup
Terraform CLI 安装与初始化技能。当用户本地未安装 Terraform 时自动完成安装,确保 terraform 命令可用并能执行 init/validate。不负责 Provider 凭证配置,凭证在实际使用时由 terraform-skill 引导。
精选 agentscope-ai/QwenPaw 3.6 万 原文
Codex CLIMCP 客户端
terraform-skill
Use when working with Terraform or OpenTofu - creating modules, writing tests (native test framework, Terratest), setting up CI/CD pipelines, reviewing configurations, choosing between testing approaches, debugging state issues, implementing security scanning (trivy, checkov), or making infrastructure-as-code architecture decisions
精选 agentscope-ai/QwenPaw 3.6 万 原文
Codex CLIMCP 客户端
agent-browser
Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction.
精选 shanraisshan/claude-code-best-practice 6.7 万 原文
Claude CodeCodex CLIGemini CLI
presentation-structure
Knowledge about the presentation slide format, weight system, navigation, and section structure
精选 shanraisshan/claude-code-best-practice 6.7 万 原文
Claude CodeCodex CLIGemini CLI
presentation-styling
Knowledge about CSS classes, component patterns, and syntax highlighting in the presentation
精选 shanraisshan/claude-code-best-practice 6.7 万 原文
Claude CodeCodex CLIGemini CLI
vibe-to-agentic-framework
The conceptual framework behind the presentation — what "Vibe Coding to Agentic Engineering" means, why the journey is structured the way it is, and how every slide fits the narrative arc
精选 shanraisshan/claude-code-best-practice 6.7 万 原文
Claude CodeCodex CLIGemini CLI
time-skill
Display the current time in Pakistan Standard Time (PKT, UTC+5). Use when the user asks for the current time, Pakistan time, or PKT.
精选 shanraisshan/claude-code-best-practice 6.7 万 原文
Claude CodeCodex CLIGemini CLI
weather-fetcher
Instructions for fetching current weather temperature data for Dubai, UAE from Open-Meteo API
精选 shanraisshan/claude-code-best-practice 6.7 万 原文
Claude CodeCodex CLIGemini CLI