Schedule
Global scheduled tasks wake an assistant later without requiring the current session to stay open. They are not org identity and they are not session-bound follow-ups.
Routing decision
Should the run stay bound to the current session?
Yes -> session-schedule (scheduled_task__scheduleCallback)
No -> schedule (scheduled_task__createScheduledTask)
Recurring vs one-shot is not the primary split. Global tasks require cron. Session-bound one-shots use session-schedule.
Workflow
1. Confirm global scheduling is appropriate
- Use global tasks for cron-based wake-ups, background recurrence, heartbeat loops, or assistant-level automation.
- Do not require teamwork scaffolding for a standalone global task.
- If the user wants org-visible lineage or org-root resume behavior, stop and use
org.
2. Create the task
Single global task (default path):
- Use
scheduled_task__createScheduledTask(name, cronExpression, assistantId, message). - Optional:
scheduleTimezone,executionMode,workspaceOverride. - The tool returns a task ID. Keep it for follow-up calls.
3. Operate tasks deliberately
scheduled_task__listScheduledTasks()— discover task IDs and enabled statescheduled_task__getScheduledTask(taskId)— read message, cron, and pinned session statescheduled_task__updateScheduledTask(taskId, ...)— retune cadence, message, or workspacescheduled_task__toggleScheduledTask(taskId, enabled=...)— pause or resumescheduled_task__deleteScheduledTask(taskId)— remove stale automation
4. Respect governance limits
- Backend policy enforces a minimum interval between runs.
- Do not assume unlimited frequency.
- If policy limits are reached, widen the cron cadence or request a limit increase through Settings.
5. Keep identity clean
- A scheduled task may wake a coordinator, but it is still not an org.
- Org lineage belongs in org tooling, not scheduled-task metadata.
Teamwork integration (optional)
When the workspace already uses the scheduled teamwork substrate:
- If the governing root session has not prepared the teamwork artifact directory yet, stop and use
teamworkto callagent__prepareTeamworkWorkspace()first. - Read
.libragent/teamwork.jsonif present. - Confirm
executionSubstrate.modeis"scheduled"when the user expects recurring teamwork automation driven by scheduled tasks. - Ensure teamwork scaffold files (
agents.md,MISSION.md, coordination files) are current before a scheduled coordinator wakes up. - Treat the app-local teamwork artifact directory as orchestration SSOT; use
workspaceOverrideonly when a run must target a different implementation workspace.
If the user only wants one global cron job with no multi-agent constitution, skip teamwork entirely.
Guardrails
- Do not use global scheduled tasks for simple in-session delays; use
session-schedule. - Use
workspaceOverrideonly when the scheduled run must target a specific existing workspace. - Backend minimum-interval policy still applies. Do not assume unlimited frequency.