Agent Scheduling
Station supports cron-based scheduling for automated agent execution. Run health checks, cost analysis, compliance audits, or any other task on a regular schedule.Quick Start
Via MCP Tools
set_schedule MCP tool to configure the schedule.
Via CLI
Via .prompt File
Cron Expression Format
Station uses 6-field cron expressions with second precision:Common Patterns
| Schedule | Cron Expression | Description |
|---|---|---|
| Every 5 minutes | 0 */5 * * * * | Run at 0, 5, 10… minutes |
| Every hour | 0 0 * * * * | Run at the top of every hour |
| Daily at 9 AM | 0 0 9 * * * | Run once daily |
| Daily at midnight | 0 0 0 * * * | Run at 00:00 |
| Weekly on Monday | 0 0 0 * * 1 | Run Monday at midnight |
| Weekdays at 8 AM | 0 0 8 * * 1-5 | Mon-Fri at 8 AM |
| Monthly on 1st | 0 0 0 1 * * | First day of month |
| Every 30 seconds | */30 * * * * * | Twice per minute |
Configuration Methods
1. MCP Tools (Recommended)
Use natural language in your AI assistant:set_schedule- Create or update a scheduleget_schedule- View current scheduleremove_schedule- Delete a schedule
2. Declarative (.prompt file)
Add aschedule block to your agent’s .prompt file:
| Field | Required | Description |
|---|---|---|
cron | Yes | 6-field cron expression |
task | Yes | Task/prompt to run |
enabled | No | Enable/disable (default: true) |
variables | No | Input variables for the run |
3. CLI
Schedule Variables
Pass variables to scheduled runs:In .prompt file
Via MCP tool
{{variable_name}}.
Viewing Scheduled Runs
List Scheduled Agents
View Run History
Via MCP
Examples
Daily Cost Analysis
Continuous Health Monitoring
Weekly Compliance Audit
Business Hours Monitoring
Timezone
Schedules run in the server’s local timezone by default. To verify:Error Handling
Failed Scheduled Runs
- Failed runs are logged with error details
- Subsequent scheduled runs continue normally
- Use
stn runs list --status errorto find failures
Retry Behavior
Scheduled runs do not automatically retry on failure. Each scheduled execution is independent. For critical tasks, consider:- Building retry logic into the agent
- Using a shorter interval with idempotent tasks
- Setting up alerting via webhooks
Monitoring Schedules
Web UI
View scheduled agents athttp://localhost:8585/agents - scheduled agents show a clock icon.
Logs
Metrics
With observability enabled, scheduled runs appear as traces in Jaeger:- Open Jaeger UI (http://localhost:16686)
- Filter by
scheduled=truetag - View execution timeline
Best Practices
- Use descriptive task prompts - The scheduled task should be self-contained
- Set appropriate intervals - Don’t schedule more frequently than needed
- Include error handling - Agents should handle failures gracefully
- Monitor run history - Check for failed runs regularly
- Use variables for flexibility - Make schedules configurable
Next Steps
- Webhooks - Trigger agents from external events
- Observability - Monitor scheduled runs
- Agent Configuration - Full agent setup

