Quick Start
With Direct Prompt (No YAML needed)
With agents.yaml
Installation
PM2-Style Daemon Commands
Start Scheduler
With a Task Prompt
With a Recipe
List Schedulers
View Logs
Stop Scheduler
Restart Scheduler
Delete Scheduler
Describe Scheduler
Legacy Foreground Mode
For quick testing or one-off runs, use foreground mode:Ctrl+C to stop. Shows final statistics:
Storage Locations
- State files:
~/.praisonai/schedulers/*.json - Log files:
~/.praisonai/logs/*.log
Features
✅ PM2-style daemon management - No nohup needed✅ Process persistence - State saved to disk
✅ Easy lifecycle control - start/stop/restart/list
✅ Centralized logging - Auto-rotation, follow mode
✅ Graceful shutdown - SIGTERM with SIGKILL fallback
✅ Cost monitoring - Budget limits with $1.00 default
✅ Timeout protection - Prevent runaway executions
✅ Auto cleanup - Dead processes removed automatically
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: Simple Prompt Scheduling
Quick news check every hour:Save Configuration
Command Reference
Daemon Commands
| Command | Description | Example |
|---|---|---|
start <name> "task" | Start scheduler as daemon | praisonai schedule start my-bot "Task" |
list | List all schedulers | praisonai schedule list |
logs <name> [--follow] | View logs | praisonai schedule logs my-bot --follow |
stop <name> | Stop scheduler | praisonai schedule stop my-bot |
restart <name> | Restart scheduler | praisonai schedule restart my-bot |
delete <name> | Remove from list | praisonai schedule delete my-bot |
describe <name> | Show details | praisonai schedule describe my-bot |
save <name> [file] | Export to YAML | praisonai schedule save my-bot config.yaml |
Options
| Option | Type | Description | Default | Example |
|---|---|---|---|---|
--interval | string | Schedule interval | hourly | hourly, */30m, daily |
--max-retries | int | Max retry attempts | 3 | 3, 5 |
--timeout | int | Max execution time (seconds) | None | 60, 120 |
--max-cost | float | Budget limit in USD | $1.00 | 1.00, 5.00 |
--verbose, -v | flag | Enable verbose logging | False | - |
- Default budget is $1.00 for safety. Set to higher value or
nullin YAML to disable. - Use
--verboseto see detailed logs. Without it, output is clean for background running.
Example 2: News Monitoring with YAML (Advanced)
agents.yaml:Example 2: Data Collection (Every 30 Minutes)
agents.yaml:Example 3: With Budget and Timeout Limits
agents.yaml:Example 4: Testing with Short Interval
Python API
For programmatic control, use the Python API:Option 1: Load from agents.yaml
Option 2: Create Programmatically
Features
Core Features
- Interval-based scheduling: Run agents at regular intervals
- Background execution: Runs in daemon thread, won’t block terminal
- Automatic retry: Retry failed executions with exponential backoff (30s, 60s, 90s)
- Graceful shutdown: Clean stop with Ctrl+C
- YAML configuration: Simple configuration in agents.yaml
- CLI overrides: Override any setting from command line
Safety Features
- ⏱️ Timeout Protection: Prevent runaway executions (Unix/Linux/Mac only)
- 💰 Cost Monitoring: Real-time cost tracking with budget limits
- 📊 Statistics Tracking: Monitor execution success rates, costs, and runtime
- 🛡️ Budget Protection: Auto-stops when cost limit reached
- 🔄 Retry Logic: Exponential backoff prevents rapid failures

