Quick Start
Installation
Basic Usage
Schedule with agents.yaml
The scheduler uses your existingagents.yaml file with an optional schedule section:
Run the Scheduler
Command Options
| Option | Type | Description | Example |
|---|---|---|---|
yaml_file | path | Path to agents.yaml | agents.yaml (default) |
--interval | string | Override schedule interval | hourly, */30m |
--max-retries | int | Override max retry attempts | 3 |
--verbose, -v | flag | Enable verbose logging | - |
Schedule Intervals
| Format | Interval | Description |
|---|---|---|
hourly | 3600s | Every hour |
daily | 86400s | Every 24 hours |
*/30m | 1800s | Every 30 minutes |
*/6h | 21600s | Every 6 hours |
*/5s | 5s | Every 5 seconds (testing) |
3600 | 3600s | Custom seconds |
Examples
Example 1: News Monitoring (Hourly)
agents.yaml:Example 2: Data Collection (Every 30 Minutes)
agents.yaml:Example 3: Testing with Short Interval
Python API
For programmatic control, use the Python API:Option 1: Load from agents.yaml
Option 2: Create Programmatically
Features
- Multiple Schedule Formats - hourly, daily, custom intervals
- Automatic Retry - Exponential backoff on failures
- Statistics Tracking - Monitor success rates
- Graceful Shutdown - Clean stop with Ctrl+C
- Callbacks - Success/failure notifications
- Thread-Safe - Daemon threads for background execution
Output
Error Handling
The scheduler automatically retries failed executions with exponential backoff:- Attempt 1: Execute immediately
- Attempt 2: Wait 30s, retry
- Attempt 3: Wait 60s, retry
- Attempt 4: Wait 90s, retry
- Attempt 5: Wait 120s, retry
Stopping the Scheduler
PressCtrl+C to stop gracefully. The scheduler will:
- Set stop event
- Wait for current execution (max 10s)
- Log final statistics
- Exit cleanly
See Also
- Planning Mode - Add planning to scheduled agents
- Memory - Enable memory for scheduled agents
- Tools - Add custom tools to agents
- Examples - Working examples

