schedule_task tool creates a new scheduled task that runs as a full agent with access to all tools and the group’s context.
Overview
Scheduled tasks in NanoClaw are powerful - they run as complete agents with:- Full access to all tools (WebSearch, file operations, etc.)
- The group’s conversation context (if using
context_mode: "group") - Ability to send messages to the user
- Their own working directory and memory
Signature
Parameters
Instructions for what the agent should do when the task runs. For isolated mode, include all necessary context in the prompt since the agent won’t have access to conversation history.
The type of schedule to use.
cron- Recurring at specific times using cron expressionsinterval- Recurring every N millisecondsonce- Run once at a specific time
The schedule value in a format matching the
schedule_type:- For
cron: Standard cron expression (e.g.,"*/5 * * * *"for every 5 minutes) - For
interval: Milliseconds as a string (e.g.,"300000"for 5 minutes) - For
once: Local timestamp WITHOUT “Z” suffix (e.g.,"2026-02-01T15:30:00")
Controls whether the task agent has access to conversation history.
group- Task runs with chat history and memory (use for tasks that need conversation context)isolated- Task runs in a fresh session with no history (use for independent tasks)
- “Remind me about our discussion” →
group(needs conversation context) - “Check the weather every morning” →
isolated(self-contained task) - “Follow up on my request” →
group(needs to know what was requested) - “Generate a daily report” →
isolated(just needs instructions in prompt)
(Main group only) JID of the group to schedule the task for. Defaults to the current group.This parameter is ignored for non-main groups - they can only schedule tasks for themselves.
Return Value
The unique identifier for the scheduled task. Use this ID with other task management tools like
update_task, pause_task, or cancel_task.Format: task-{timestamp}-{random}Example: task-1706745600000-a1b2c3Schedule Types
Cron Expressions
Cron expressions follow the standard 5-field format:Interval (Milliseconds)
For simple recurring tasks, use milliseconds:One-Time Tasks
Schedule a task to run once at a specific time:once schedules, do NOT use UTC/Z suffix. The timestamp must be in local time format.
Messaging Behavior
The task agent’s output is automatically sent to the user or group. The agent can also:- Use
send_messagetool for immediate message delivery during execution - Wrap output in
<internal>tags to suppress automatic sending
- Always send (reminders, daily briefings)
- Only when there’s something to report (“notify me if…”)
- Never send (background maintenance tasks)
Examples
Validation
The tool validates theschedule_value before creating the task:
- Cron: Parses the expression using
cron-parserand returns an error if invalid - Interval: Checks that the value is a positive integer
- Once: Validates timestamp format and rejects UTC/timezone suffixes
IPC Implementation
When called, the tool writes a JSON file to/workspace/ipc/tasks/:
Related Tools
- list_tasks - View scheduled tasks
- update_task - Modify a task
- pause_task - Temporarily disable a task
- cancel_task - Delete a task