cron
它能做什么
这项技能管理在设定时间或按重复日程自动运行的任务。适合希望设置周期性提醒、检查或报告的用户。
适用场景
- ✓当你希望某个任务每天、每周或在特定时间运行的时候。
- ✓当你需要暂停、恢复或修改现有的定时任务的时候。
- ✓当你希望任务在后台静默运行,并把结果保存在其历史记录中的时候。
技能链接
https://github.com/agentscope-ai/QwenPaw/blob/main/src/qwenpaw/agents/skills/cron-en/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请设置一个任务,每个工作日上午 9 点给我发一份摘要。”
每周 5 个新技能,1 分钟读完。
工作原理
它会通过命令行工具创建、列出、更新、暂停或删除定时任务。每条命令都会指明其所属的智能体,因此任务不会被放进默认工作区。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Cron (Scheduled Task Management)
When to Use
Use this skill only when you need to automatically execute something at a future time or repeat execution on a schedule.
Should Use
- User asks to do something "daily / weekly / hourly"
- User asks for automatic reminders or execution "tomorrow at 9 AM / next Monday / at a specific time"
- Long-term periodic notifications, checks, or reports are needed
Should Not Use
- The task only needs to be executed once right now
- It is just a normal reply within the current session
- The user has not specified an execution time or schedule
- The target channel / user / session is still unclear
Decision Rules
- Only use cron for future scheduled or periodic execution
- If it only needs to be done once immediately, do not create a cron job
- Before creating, confirm execution time/schedule, target channel, target-user, and target-session
- All cron commands must explicitly include
--agent-id - Do not rely on the default agent, or the task may end up in the default workspace
- For an agent task that should run without channel output, add
--silent; execution, session history, trace, and optional Inbox recording still continue - Never run or resume an imported job while
requires_reviewis set; review and approve it in Console first
Hard Rules
Must Explicitly Specify --agent-id
All qwenpaw cron commands must include:
--agent-id <your_agent_id>
Your agent_id is found in the Agent Identity section of the system prompt (Your agent id is ...). Do not omit it, or the task may be incorrectly created in the default agent's workspace.
Common Commands
# List tasks
qwenpaw cron list --agent-id <agent_id>
# View task details
qwenpaw cron get <job_id> --agent-id <agent_id>
# View task status
qwenpaw cron state <job_id> --agent-id <agent_id>
# Create a task
qwenpaw cron create --agent-id <agent_id> ...
# Delete a task
qwenpaw cron delete <job_id> --agent-id <agent_id>
# Pause / Resume a task
qwenpaw cron pause <job_id> --agent-id <agent_id>
qwenpaw cron resume <job_id> --agent-id <agent_id>
# Run an existing task once immediately
qwenpaw cron run <job_id> --agent-id <agent_id>
# Update an existing task
qwenpaw cron update <job_id> --agent-id <agent_id> ...
Creating Tasks
Two types are supported:
- text: Send a fixed message on a schedule
- agent: Ask an agent a question on a schedule and send the reply to the target channel
Two schedule modes are supported:
- cron (
--schedule-type cron): classic cron recurrence (for example, daily 09:00 or every 2 hours) - scheduled (
--schedule-type scheduled): calendar-style schedule starting from--run-at, either one-time or repeating by day
Schedule Selection Rules (Must Follow)
- If user intent is generic recurrence ("hourly/daily/weekly") without a specific start date, prefer
cron - If user intent includes a concrete start date ("tomorrow", "next Monday", "starting from <date>", "for the next two weeks"), prefer
scheduled - For one-time
scheduledtasks: pass only--run-atand do not pass any--repeat-*options - For repeating
scheduledtasks: pass--repeat-every-daysand choose an end condition:- fixed count:
--repeat-end-type count --repeat-count N - end datetime:
--repeat-end-type until --repeat-until <ISO8601> - no end:
--repeat-end-type never
- fixed count:
Timeout Settings
Default timeout is 120 seconds (2 minutes). For longer agent tasks, you must explicitly set a larger timeout to prevent premature cancellation:
--timeout 600 # 10 minutes
--timeout 3600 # 1 hour
Core Rules:
- If the agent task involves web search, code execution, or multi-step tool calls, set
--timeout 600or higher - Timeout must be less than the scheduling interval to prevent overlap (a new run firing while the previous one is still executing). Examples:
- Every 15 minutes:
--timeoutshould not exceed 900 seconds - Every 10 minutes:
--timeoutrecommend no more than 80% of interval (i.e. 480 seconds) - Daily:
--timeoutcan be larger, no special restriction needed
- Every 15 minutes:
- For frequent tasks (interval ≤ 10 minutes), follow timeout ≤ 80% of interval; for infrequent tasks (hourly or above), set based on actual needs
Minimum Information Required Before Creating
--type--name--schedule-type--cron(when--schedule-type cron)- `--
常见问题
一次性任务应该用它吗?
不应该。如果任务只需要立即运行一次,技能会建议直接执行,而不是设置定时。
为什么必须提供智能体 ID?
如果没有它,任务可能会落入默认工作区,因此技能始终要求提供。
静默模式是做什么的?
它会运行智能体任务,但不将输出发送到频道,同时仍会保留其历史记录。
详情
作者的原始描述
Use this skill only for scheduled or recurring tasks. Manage jobs with qwenpaw cron list/create/get/state/update/pause/resume/delete/run, and always pass --agent-id explicitly.
repo: agentscope-ai/QwenPaw
热度
- GitHub 星标
- 37k
- 排名
- #7574
- 许可证
- Apache-2.0
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
terraform-skill
37k帮你的智能体编写、测试和审查 Terraform 或 OpenTofu 基础设施代码,涵盖模块、CI/CD、安全扫描和状态问题。
computer_use
37k当没有直接工具能完成工作时,让你的智能体通过观察屏幕、点击并检查每一步结果,来操作正在运行的 Windows 或 macOS 应用。
browser
37k通过 QwenPaw Browser SDK 让你的智能体操作真实的网页浏览器,读取页面、对页面执行操作,并在声称成功前检查结果。
channel_message
37k在找到正确的目的地之后,让你的智能体向特定的聊天频道或会话发送单向消息,例如任务完成的提醒。