Schedule Management
The Schedule Management feature allows you to automate flow execution by creating recurring or one-time schedules. This powerful tool enables hands-free testing and monitoring by automatically running your flows at specified times or intervals.
Overview
The Schedule Manager provides:
- Calendar View: Visual representation of upcoming scheduled flows
- List View: Detailed list of all schedules with management controls
- Flexible Scheduling: Support for various scheduling patterns (time-based, interval-based, day-based)
- Machine Assignment: Control which machines can execute specific schedules
- Schedule Controls: Pause, resume, edit, and delete schedules
- Real-time Status: Live updates of schedule states and next run times
Key Features
Schedule Types
- One-Time Schedules: Execute a flow once at a specific date and time
- Recurring Schedules: Repeat execution at regular intervals or specific times
Scheduling Options
- Interval-based: Schedule every X minutes, hours, days, weeks, or months
- Time-of-day: Execute at specific times (e.g., daily at 9:00 AM)
- Day-of-week: Weekly schedules (e.g., every Monday)
- Day-of-month: Monthly schedules (e.g., 1st of every month)
- Cron expressions: Advanced scheduling using cron syntax
Machine Management
- Multi-machine support: Assign schedules to specific machines or all machines
- Load balancing: Distribute scheduled executions across available machines
- Machine filtering: Only active machines can execute assigned schedules
User Interface
Main Interface
The Schedule Manager is accessible via the main navigation and consists of two main views:
Calendar View (Left Panel)
- Monthly calendar showing upcoming scheduled executions
- Visual indicators for different schedule types and states
- Date selection to filter the list view
- Interactive schedule items that can be clicked to edit
List View (Right Panel)
- Comprehensive table of all schedules
- Status badges showing active/inactive states
- Schedule type indicators (Recurring/One-Time)
- Next run timestamps with formatted dates
- Action buttons for edit, pause/resume, and delete operations
Header Controls
- "Schedule Manager" title with calendar icon
- "Manage Machines" button to configure available machines
- "Create Schedule" button to add new schedules
Creating Schedules
Basic Schedule Creation
- Navigate to Schedule Manager at
http://localhost:8080/schedules - Click "Create Schedule" button
- Fill in the schedule details:
- Name (optional): Descriptive name for the schedule
- Flow: Select the flow to execute (required)
- Schedule Type: Choose "Recurring" or "One-Time"
- Start Date: When the schedule becomes active
Scheduling Configuration
For One-Time Schedules
- Set Start Date and optional Time of Day
- Schedule executes once and then becomes inactive
For Recurring Schedules
Choose one of the scheduling methods:
Interval-Based Scheduling
- Interval Value: Number (e.g., 2)
- Interval Type: Minutes, Hours, Days, Weeks, or Months
- Example: "Every 2 hours"
Time-of-Day Scheduling
- Time of Day: Specific time in HH:mm format (e.g., 09:00)
- Interval Type/Value: How often to repeat (e.g., Daily)
- Example: "Every day at 9:00 AM"
Day-of-Week Scheduling
- Day of Week: Sunday (0) through Saturday (6)
- Time of Day: Optional specific time
- Example: "Every Monday at 10:00 AM"
Day-of-Month Scheduling
- Day of Month: 1-31 (note: 31st won't run in shorter months)
- Time of Day: Optional specific time
- Example: "1st of every month at 8:00 AM"
Advanced Cron Scheduling
- Cron Expression: Standard cron syntax
- Example:
"0 9 * * 1"(Every Monday at 9:00 AM)
Machine Assignment
- Machine IDs: Comma-separated list of machine IDs that can execute this schedule
- Empty field: Schedule can run on any available machine
- Load balancing: System automatically distributes across assigned machines
Advanced Options
- End Date: Optional date when schedule should stop recurring
- Is Active: Whether schedule should start active (default: true)
Managing Schedules
Viewing Schedule Details
Each schedule in the list shows:
- Schedule name or "Unnamed Schedule"
- Active/Inactive badge with color coding
- Schedule type badge (Recurring/One-Time)
- Flow ID for reference
- Machine assignment (specific machines or "All machines")
- Next run time formatted as "MMM d, yyyy h:mm a"
- Last run time (if available)
Schedule Operations
Editing Schedules
- Click the edit button (pencil icon) on any schedule
- Modify schedule parameters as needed
- Save changes - system recalculates next run time automatically
Pausing/Resuming Schedules
- Pause button (⏸️): Temporarily stops schedule execution
- Resume button (▶️): Restarts paused schedules
- Active schedules show pause button
- Paused schedules show resume button
Deleting Schedules
- Click the delete button (trash icon)
- Confirm deletion in the popup dialog
- Schedule is permanently removed
Calendar Interaction
- Click dates in calendar view to filter list view
- Click schedule items in calendar to edit them
- Visual indicators show schedule density per day
Schedule States and Status
Schedule Status
- Active: Schedule is running and will execute at next run time
- Paused: Schedule is temporarily stopped
- Expired: End date has passed (for recurring schedules)
- One-time completed: One-time schedule has executed
Execution Status
- Next Run: Calculated time for next execution
- Last Run: Timestamp of most recent execution
- Running: Currently executing (shown in flow execution interface)
Technical Details
The Schedule Management system uses a sophisticated backend architecture:
Scheduler Service
- Background processing: Runs every 60 seconds to check for due schedules
- Machine-aware execution: Only executes schedules on assigned machines
- Atomic operations: Prevents duplicate executions across multiple instances
- Intelligent scheduling: Calculates next run times based on schedule type and parameters
- Error recovery: Automatically retries failed executions
Next Run Calculation
The system calculates execution times based on:
- Schedule type: One-time vs recurring schedules
- Timing parameters: Intervals, time-of-day, day-of-week, or day-of-month
- Execution history: Prevents immediate re-triggering after execution
- Date constraints: Respects start and end date boundaries
For complete API documentation, see the Schedule Management API reference.
Usage Examples
Daily Health Check
Create a recurring schedule to run system health checks:
- Flow: Health monitoring flow
- Schedule Type: Recurring
- Time of Day: 08:00
- Interval: Daily
- Machines: All machines
Weekly Report Generation
Set up automated report generation:
- Flow: Report generation flow
- Schedule Type: Recurring
- Day of Week: 1 (Monday)
- Time of Day: 09:00
- Interval: Weekly
- Machines: reporting-server-01
Load Testing Schedule
Configure periodic load testing:
- Flow: Load testing flow
- Schedule Type: Recurring
- Interval Value: 4
- Interval Type: Hours
- Machines: load-test-01, load-test-02
Best Practices
Schedule Design
- Use descriptive names for easy identification
- Set reasonable intervals to avoid system overload
- Configure end dates for temporary schedules
- Assign specific machines for resource-intensive flows
- Test schedules before relying on them
Performance Considerations
- Distribute across machines to balance load
- Avoid overlapping executions of resource-intensive flows
- Monitor execution history to identify issues
- Use appropriate intervals based on flow duration
Maintenance
- Regular review of active schedules
- Clean up expired one-time schedules
- Update machine assignments when infrastructure changes
- Monitor execution success rates
Troubleshooting
Common Issues
Schedule Not Executing
- Check if schedule is active
- Verify machine assignment matches available machines
- Confirm flow exists and is executable
- Check system logs for execution errors
Wrong Execution Time
- Verify time zone settings
- Check daylight saving time considerations
- Review schedule configuration parameters
Duplicate Executions
- Ensure only one scheduler service instance is running
- Check machine assignments don't overlap inappropriately
- Review atomic claiming mechanism logs
Calendar Not Showing Schedules
- Verify date range includes schedule dates
- Check if schedules are assigned to current machine
- Refresh the page to reload calendar data
Error Messages
- "Flow not found": Selected flow was deleted
- "Invalid time format": Time of day format incorrect
- "Machine not available": Assigned machine is offline
- "Schedule expired": End date has passed
Debug Steps
- Check browser console for frontend errors
- Review server logs for backend issues
- Verify database connectivity
- Test flow execution manually
- Check machine status and connectivity
Integration
The Schedule Management system integrates with:
- Flow Management: Executes flows from the flow library
- Device Management: Coordinates with device availability
- Queue Management: Uses execution queues for flow processing
- Machine Configuration: Respects machine assignments and load balancing
- Execution History: Tracks schedule execution results
Security Considerations
- Machine isolation: Schedules only execute on assigned machines
- Flow validation: Ensures scheduled flows exist and are accessible
- Execution limits: Prevents excessive concurrent executions
- Audit logging: Tracks all schedule operations and executions
Previous: Queue Management | Next: Audio Management