$npx -y skills add agentscope-ai/QwenPaw --skill cron-enUse 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.
| 1 | # Cron (Scheduled Task Management) |
| 2 | |
| 3 | ## When to Use |
| 4 | |
| 5 | Use this skill only when you need to **automatically execute something at a future time** or **repeat execution on a schedule**. |
| 6 | |
| 7 | ### Should Use |
| 8 | - User asks to do something "daily / weekly / hourly" |
| 9 | - User asks for automatic reminders or execution "tomorrow at 9 AM / next Monday / at a specific time" |
| 10 | - Long-term periodic notifications, checks, or reports are needed |
| 11 | |
| 12 | ### Should Not Use |
| 13 | - The task only needs to be **executed once right now** |
| 14 | - It is just a normal reply within the current session |
| 15 | - The user has not specified an execution time or schedule |
| 16 | - The target channel / user / session is still unclear |
| 17 | |
| 18 | ## Decision Rules |
| 19 | |
| 20 | 1. **Only use cron for future scheduled or periodic execution** |
| 21 | 2. **If it only needs to be done once immediately, do not create a cron job** |
| 22 | 3. **Before creating, confirm execution time/schedule, target channel, target-user, and target-session** |
| 23 | 4. **All cron commands must explicitly include `--agent-id`** |
| 24 | 5. **Do not rely on the default agent, or the task may end up in the default workspace** |
| 25 | 6. **For an agent task that should run without channel output, add `--silent`; execution, session history, trace, and optional Inbox recording still continue** |
| 26 | |
| 27 | --- |
| 28 | |
| 29 | ## Hard Rules |
| 30 | |
| 31 | ### Must Explicitly Specify `--agent-id` |
| 32 | |
| 33 | All `qwenpaw cron` commands **must** include: |
| 34 | |
| 35 | ```bash |
| 36 | --agent-id <your_agent_id> |
| 37 | ``` |
| 38 | |
| 39 | Your agent_id is found in the Agent Identity section of the system prompt (Your agent id is ...). |
| 40 | Do not omit it, or the task may be incorrectly created in the default agent's workspace. |
| 41 | |
| 42 | --- |
| 43 | |
| 44 | ## Common Commands |
| 45 | |
| 46 | ```bash |
| 47 | # List tasks |
| 48 | qwenpaw cron list --agent-id <agent_id> |
| 49 | |
| 50 | # View task details |
| 51 | qwenpaw cron get <job_id> --agent-id <agent_id> |
| 52 | |
| 53 | # View task status |
| 54 | qwenpaw cron state <job_id> --agent-id <agent_id> |
| 55 | |
| 56 | # Create a task |
| 57 | qwenpaw cron create --agent-id <agent_id> ... |
| 58 | |
| 59 | # Delete a task |
| 60 | qwenpaw cron delete <job_id> --agent-id <agent_id> |
| 61 | |
| 62 | # Pause / Resume a task |
| 63 | qwenpaw cron pause <job_id> --agent-id <agent_id> |
| 64 | qwenpaw cron resume <job_id> --agent-id <agent_id> |
| 65 | |
| 66 | # Run an existing task once immediately |
| 67 | qwenpaw cron run <job_id> --agent-id <agent_id> |
| 68 | |
| 69 | # Update an existing task |
| 70 | qwenpaw cron update <job_id> --agent-id <agent_id> ... |
| 71 | ``` |
| 72 | |
| 73 | --- |
| 74 | |
| 75 | ## Creating Tasks |
| 76 | |
| 77 | Two types are supported: |
| 78 | - **text**: Send a fixed message on a schedule |
| 79 | - **agent**: Ask an agent a question on a schedule and send the reply to the target channel |
| 80 | |
| 81 | Two schedule modes are supported: |
| 82 | - **cron** (`--schedule-type cron`): classic cron recurrence (for example, daily 09:00 or every 2 hours) |
| 83 | - **scheduled** (`--schedule-type scheduled`): calendar-style schedule starting from `--run-at`, either one-time or repeating by day |
| 84 | |
| 85 | ### Schedule Selection Rules (Must Follow) |
| 86 | - If user intent is generic recurrence ("hourly/daily/weekly") without a specific start date, prefer `cron` |
| 87 | - If user intent includes a concrete start date ("tomorrow", "next Monday", "starting from <date>", "for the next two weeks"), prefer `scheduled` |
| 88 | - For one-time `scheduled` tasks: pass only `--run-at` and do not pass any `--repeat-*` options |
| 89 | - For repeating `scheduled` tasks: pass `--repeat-every-days` and choose an end condition: |
| 90 | - fixed count: `--repeat-end-type count --repeat-count N` |
| 91 | - end datetime: `--repeat-end-type until --repeat-until <ISO8601>` |
| 92 | - no end: `--repeat-end-type never` |
| 93 | |
| 94 | ### Timeout Settings |
| 95 | |
| 96 | Default timeout is 120 seconds (2 minutes). For longer agent tasks, you **must** explicitly set a larger timeout to prevent premature cancellation: |
| 97 | |
| 98 | ```bash |
| 99 | --timeout 600 # 10 minutes |
| 100 | --timeout 3600 # 1 hour |
| 101 | ``` |
| 102 | |
| 103 | **Core Rules**: |
| 104 | 1. If the agent task involves web search, code execution, or multi-step tool calls, set `--timeout 600` or higher |
| 105 | 2. **Timeout must be less than the scheduling interval** to prevent overlap (a new run firing while the previous one is still executing). Examples: |
| 106 | - Every 15 minutes: `--timeout` should not exceed 900 seconds |
| 107 | - Every 10 minutes: `--timeout` recommend no more than 80% of interval (i.e. 480 seconds) |
| 108 | - Daily: `--timeout` can be larger, no special restriction needed |
| 109 | 3. For frequent tasks (interval ≤ 10 minutes), follow **timeout ≤ 80% of interval**; for infrequent tasks (hourly or above), set based on actual needs |
| 110 | |
| 111 | ### Minimum Information Required Before Creating |
| 112 | - `--type` |
| 113 | - `--name` |
| 114 | - `--schedule-type` |
| 115 | - `--cron` (when `--schedule-type cron`) |
| 116 | - `--run-at` (when `--schedule-type scheduled`) |
| 117 | - `--channel` |
| 118 | - `--target-user` |
| 119 | - `--target-session` |
| 120 | - `--text` |
| 121 | - `--agent-id` |
| 122 | - `--timeout` (for agent-type tasks, set an appropriate timeout based on expected execution time) |
| 123 | |
| 124 | If any of this information is missing, confirm with the user before creating the task. |
| 125 | |
| 126 | ### Creation Examples |
| 127 | |
| 128 | ```ba |