docs/tools/scheduler.mdx
Create and manage dynamic scheduled tasks with flexible scheduling and execution modes.
| Dependency | Install Command |
|---|---|
croniter ≥ 2.0.0 | pip install croniter>=2.0.0 |
Included in core dependencies: pip3 install -r requirements.txt
| Mode | Description |
|---|---|
| One-time | Execute once at a specified time |
| Fixed interval | Repeat at fixed time intervals |
| Cron expression | Define complex schedules using Cron syntax |
Create and manage scheduled tasks with natural language:
Scheduled tasks run inside an isolated session (so internal planning and tool calls do not pollute the user's chat), but the final output is written back to the user's real session as a message pair. You can directly follow up — e.g. "expand on point 2 from earlier".
Default policy
Configuration
| Key | Default | Description |
|---|---|---|
scheduler_inject_to_session | true | Master switch |
scheduler_inject_max_per_session | 3 | Max scheduler message pairs kept per session |
scheduler_inject_send_message | false | Whether to also inject fixed-message tasks |
{
"scheduler_inject_to_session": true,
"scheduler_inject_max_per_session": 3,
"scheduler_inject_send_message": false
}
The isolated session for scheduled tasks retains a few recent runs of conversation history, so you can naturally do "compare with last time" or "continue from previous conclusion". To prevent prompts from growing unbounded for high-frequency tasks (e.g. a 5-minute monitor), history is auto-trimmed:
scheduler_keep_turns = max(1, agent_max_context_turns / 5)
agent_max_context_turns defaults to 20, so each scheduled run keeps the most recent 4 turns of history by default. Increase agent_max_context_turns if you need longer memory.