NanoClaw’s task scheduler runs Claude agents on a schedule, allowing you to automate recurring tasks like daily reports, weekly summaries, or periodic checks. Tasks can message you with results or update files in their group folder.
Tasks are created through natural language requests to the agent:
Copy
Ask AI
@Andy send me a summary of my calendar every weekday at 9am@Andy check for new GitHub issues every hour and notify me@Andy remind me to review the budget tomorrow at 2pm@Andy compile AI news from Hacker News every Monday at 8am
// Each task run gets a fresh sessioncontext_mode: 'isolated'
Isolated mode is recommended for most tasks - each run is independent and won’t be affected by previous conversations.Group context mode allows tasks to build on previous context and remember information across runs. Useful for tasks that need continuity.
// From src/task-scheduler.ts — computeNextRun functionlet nextRun: string | null = null;if (task.schedule_type === 'cron') { const interval = CronExpressionParser.parse(task.schedule_value, { tz: TIMEZONE, }); nextRun = interval.next().toISOString();} else if (task.schedule_type === 'interval') { const ms = parseInt(task.schedule_value, 10); // Anchor to the scheduled time, not now, to prevent drift let next = new Date(task.next_run).getTime() + ms; while (next <= Date.now()) { next += ms; } nextRun = new Date(next).toISOString();}// 'once' tasks have no next run
Tasks are managed through IPC messages written to data/ipc/{group}/tasks/:
Copy
Ask AI
{ "type": "schedule_task", "prompt": "Send me a summary of today's events", "schedule_type": "cron", "schedule_value": "0 9 * * *", "context_mode": "isolated", "targetJid": "user@s.whatsapp.net or tg:12345 or similar"}
After any task mutation via IPC, the current_tasks.json snapshot is refreshed immediately for all groups. This means list_tasks always returns up-to-date results, even within the same agent session.