cookbook/05_agent_os/scheduler/README.md
Examples for scheduler in AgentOS.
basic_schedule.py — Basic scheduled agent run.schedule_management.py — Schedule management via REST API.direnv allow (requires .envrc)..venvs/demo/bin/python <path-to-file>.py.Install scheduler dependencies:
pip install agno[scheduler]
This installs croniter and pytz.
Minimal example: creates an AgentOS with a single agent and enables the scheduler. A schedule is created via the API that triggers the agent every 5 minutes.
Demonstrates full CRUD lifecycle: creating, listing, updating, enabling/disabling, triggering, and deleting schedules via the REST API.
AgentOS(
agents=[my_agent],
db=db,
scheduler=True, # Enable the scheduler
scheduler_poll_interval=15, # Poll every 15 seconds (default)
scheduler_base_url="http://127.0.0.1:7777", # AgentOS base URL
)