Schedule a task to run later or on a recurring basis. Prefer the schedule_task tool; fallback to IPC only if needed.
Prefer the built-in schedule_task tool.
Use schedule_task directly with:
schedule_type: once | cron | intervalschedule_value:
once: ISO timestamp (UTC recommended)cron: cron expressioninterval: millisecondstask_kind: agent or shellprompt (agent) or command (shell)Examples:
schedule_type=once, schedule_value=2026-03-09T09:00:00Zschedule_type=cron, schedule_value=30 8 * * *If tool access is unavailable, write an IPC JSON file to $PICLAW_DATA/ipc/tasks/:
cat > "$PICLAW_DATA/ipc/tasks/schedule_$(date +%s).json" <<EOF
{
"type": "schedule_task",
"chatJid": "$PICLAW_CHAT_JID",
"task_kind": "agent",
"prompt": "Describe what should happen when this task fires",
"schedule_type": "once",
"schedule_value": "2026-03-09T09:00:00Z"
}
EOF
Shell command variant:
cat > "$PICLAW_DATA/ipc/tasks/schedule_$(date +%s).json" <<EOF
{
"type": "schedule_task",
"chatJid": "$PICLAW_CHAT_JID",
"task_kind": "shell",
"command": "ls -la /workspace",
"cwd": ".",
"timeout_sec": 30,
"schedule_type": "interval",
"schedule_value": "3600000"
}
EOF
After scheduling, confirm with SQL introspection:
SELECT id, chat_jid, task_kind, schedule_type, schedule_value, status, next_run
FROM scheduled_tasks
ORDER BY created_at DESC
LIMIT 5;
For execution history:
SELECT task_id, run_at, duration_ms, status
FROM task_run_logs
ORDER BY id DESC
LIMIT 10;
{ "type": "pause_task", "taskId": "task-xxx" }{ "type": "resume_task", "taskId": "task-xxx" }{ "type": "cancel_task", "taskId": "task-xxx" }{ "type": "update_task", "taskId": "task-xxx", "prompt": "...", "model": "...", "schedule_value": "..." }{ "type": "cleanup_tasks", "chatJid": "web:default" }/workspace).PICLAW_DATA — piclaw data directory (contains ipc/, sessions/)PICLAW_CHAT_JID — JID of the triggering chat