只有在需要未来某个时间自动执行,或按周期重复执行时,使用本 skill。
--agent-id
--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>
支持两种类型:
--type
--name
--cron
--channel
--target-user
--target-session
--text
--agent-id
如果缺少这些信息,应先向用户确认,再创建任务。
qwenpaw cron create \
--agent-id <agent_id> \
--type text \
--name "每日早安" \
--cron "0 9 * * *" \
--channel imessage \
--target-user "CHANGEME" \
--target-session "CHANGEME" \
--text "早上好!"
qwenpaw cron create \
--agent-id <agent_id> \
--type agent \
--name "检查待办" \
--cron "0 */2 * * *" \
--channel dingtalk \
--target-user "CHANGEME" \
--target-session "CHANGEME" \
--text "我有什么待办事项?"
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 管理
0 9 * * * 每天 9:00
0 */2 * * * 每 2 小时
30 8 * * 1-5 工作日 8:30
0 0 * * 0 每周日零点
*/15 * * * * 每 15 分钟
如果只是现在执行一次,通常不要创建 cron。
这会导致任务落到错误的 agent / workspace。所有 cron 命令都必须显式传 --agent-id。
如果用户没说明时间、周期、目标 channel 或目标 session,应先追问。
暂停、恢复、删除前,先用:
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>
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