Tasks & Scheduling
Assign discrete, trackable work to agents — run now, schedule for later, or set up recurring jobs.
Tasks & Scheduling
Tasks are the automation primitive. Use them to run agents on a schedule, chain multi-step jobs, and track results.
Task vs session
| Session | Task | |
|---|---|---|
| Initiated by | User sending a message | Code, scheduler, or trigger |
| Duration | Open-ended | Defined goal with completion |
| Tracking | Message history | Status, progress, stored results |
| Scheduling | Manual | Cron, one-time, dependency-based |
Create a task
Then execute it:
Execution modes
single — agent runs the description as a prompt
The description becomes the user message. The agent uses its tools and model to complete it.
workflow — execute a defined workflow
sequential — run sub-tasks in order
Each sub-task receives the previous one's output as context.
Scheduling
One-time: run at a specific time
Recurring: cron expression
Common cron patterns:
| Pattern | Meaning |
|---|---|
0 8 * * * | Every day at 8am |
0 8 * * 1-5 | Weekdays at 8am |
*/30 * * * * | Every 30 minutes |
0 9 * * 1 | Every Monday at 9am |
0 0 1 * * | First of every month at midnight |
Dependencies
A task can wait for other tasks to complete before it starts:
The writing task won't start until the research task completes. Its output is passed as context automatically.
Monitor progress
Poll for status
Task lifecycle: pending → running → completed / failed / cancelled
Stream live updates
SSE events:
Tool constraints
Control exactly which tools a task can use:
| Constraint | Behavior |
|---|---|
none | Use all agent tools (default) |
soft | Prefer listed tools, others allowed |
hard | Only listed tools, no others |
Priority
Values: low · medium (default) · high · critical
Higher priority tasks are picked up first when multiple tasks queue for the same agent.