name: schedule-task description: "Create a scheduled task that can be run on demand or automatically on an interval."
You are creating a reusable shortcut from the current session. Follow these steps:
1. Analyze the session
Review the session history to identify the core task the user performed or requested. Distill it into a single, repeatable objective.
2. Draft a prompt
The prompt will be used for future autonomous runs — it must be entirely self-contained. Future runs will NOT have access to this session, so never reference "the current conversation," "the above," or any ephemeral context.
Include in the description:
- A clear objective statement (what to accomplish)
- Specific steps to execute
- Any relevant file paths, URLs, repositories, or tool names
- Expected output or success criteria
- Any constraints or preferences the user expressed
Write the description in second-person imperative ("Check the inbox…", "Run the test suite…"). Keep it concise but complete enough that another Claude session could execute it cold.
3. Choose a taskName
Pick a short, descriptive name in kebab-case (e.g. "daily-inbox-summary", "weekly-dep-audit", "format-pr-description").
4. Determine scheduling
Decide whether the task is recurring or one-off:
- Clearly one-off (e.g. "refactor this function") → omit the cron expression.
- Clearly recurring (e.g. "check my inbox every morning") → include an appropriate cron expression.
- Ambiguous → propose a reasonable schedule and ask the user to confirm using AskUserQuestion before proceeding.
IMPORTANT: Cron expressions run in the user's local machine timezone, NOT UTC. Use local times directly in the cron expression. For example, if the user asks for "8am every Friday", use 0 8 * * 5 — do NOT convert to UTC.
Finally, call the "create_scheduled_task" tool.