> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mixus.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Scheduling Agents

> Automate your workflows by scheduling AI agents to run at specific times, intervals, or triggered by events

Automate your business processes with intelligent agent scheduling. Set up agents to run on schedules, respond to events, or trigger based on external conditions. From simple daily tasks to complex multi-step workflows, mixus scheduling ensures your AI agents work when you need them.

## Overview

Agent scheduling in mixus transforms one-time AI interactions into powerful automation workflows. Whether you need daily reports, periodic data analysis, or event-driven responses, the scheduling system provides flexible options to automate your processes while maintaining full control and monitoring.

## How Agent Scheduling Works

The scheduling system operates through multiple trigger mechanisms:

1. **Time-Based Scheduling**: Run agents at specific times or intervals
2. **Event-Driven Triggers**: Activate agents based on external events or data changes
3. **Conditional Logic**: Execute agents when specific conditions are met
4. **Workflow Orchestration**: Chain multiple agents in complex sequences
5. **Performance Monitoring**: Track execution and optimize scheduling
6. **Error Handling**: Automatic retry and failure management

<Card title="Agent scheduling workflow " icon="image">
  Image placeholder - To be added
</Card>

## Scheduling Types

### Time-Based Scheduling

#### Fixed Schedule

Run agents at predetermined times with precision:

```json Fixed Schedule Examples theme={null}
{
  "daily_report": {
    "schedule_type": "fixed",
    "frequency": "daily",
    "time": "09:00",
    "timezone": "America/New_York",
    "description": "Generate daily performance report",
    "agent_config": {
      "agent_id": "daily_reporter",
      "parameters": {
        "report_date": "today",
        "include_charts": true,
        "recipients": ["management@company.com"]
      }
    }
  },
  "weekly_analysis": {
    "schedule_type": "fixed",
    "frequency": "weekly",
    "day_of_week": "monday",
    "time": "08:00",
    "timezone": "UTC",
    "description": "Weekly market analysis and insights",
    "agent_config": {
      "agent_id": "market_analyzer",
      "parameters": {
        "analysis_period": "last_week",
        "markets": ["technology", "healthcare", "finance"]
      }
    }
  },
  "monthly_summary": {
    "schedule_type": "fixed",
    "frequency": "monthly",
    "day_of_month": 1,
    "time": "07:00",
    "timezone": "UTC",
    "description": "Monthly business summary and metrics",
    "agent_config": {
      "agent_id": "business_summarizer",
      "parameters": {
        "period": "previous_month",
        "detailed": true
      }
    }
  }
}
```

#### Interval-Based Scheduling

Run agents at regular intervals for continuous monitoring:

```plaintext Interval Scheduling Options theme={null}
⏰ Interval-Based Schedules:

⚡ High Frequency (Real-time Monitoring):
├── 🔄 Every 5 minutes: System health checks
├── 🔄 Every 15 minutes: Price monitoring
├── 🔄 Every 30 minutes: Social media sentiment
└── 🔄 Every hour: Competitor analysis

📊 Medium Frequency (Regular Updates):
├── 🔄 Every 2 hours: News aggregation
├── 🔄 Every 4 hours: Inventory updates
├── 🔄 Every 6 hours: Customer feedback analysis
└── 🔄 Every 12 hours: Performance metrics

📅 Low Frequency (Periodic Reviews):
├── 🔄 Daily: Content curation
├── 🔄 Weekly: Trend analysis
├── 🔄 Monthly: Compliance checks
└── 🔄 Quarterly: Strategic insights
```

#### Flexible Scheduling

Dynamic scheduling based on business logic:

```json Flexible Schedule Configuration theme={null}
{
  "business_hours_only": {
    "schedule_type": "flexible",
    "conditions": {
      "time_range": {
        "start": "09:00",
        "end": "17:00"
      },
      "days": ["monday", "tuesday", "wednesday", "thursday", "friday"],
      "exclude_holidays": true,
      "timezone": "America/New_York"
    },
    "frequency": "every_2_hours",
    "description": "Customer service monitoring during business hours"
  },
  "market_hours": {
    "schedule_type": "flexible",
    "conditions": {
      "market_open": true,
      "exclude_weekends": true,
      "special_conditions": {
        "earnings_season": "increase_frequency",
        "high_volatility": "enable_alerts"
      }
    },
    "frequency": "every_15_minutes",
    "description": "Trading signal analysis during market hours"
  }
}
```

### Event-Driven Scheduling

#### External Event Triggers

Respond to events from connected services and systems:

```plaintext Event Trigger Types theme={null}
📡 External Event Triggers:

💬 Communication Events:
├── 📧 New email received (specific sender/subject)
├── 💬 Slack message mentions or keywords
├── 📞 Calendar meeting starting/ending
└── 📱 SMS or WhatsApp message received

📊 Business Events:
├── 💰 New sale or transaction completed
├── 👤 Customer support ticket created
├── 📈 KPI threshold crossed (up or down)
├── 🚨 System alert or error detected
└── 📦 Inventory level reached minimum

🌐 External Data Events:
├── 📰 News article matching keywords
├── 📈 Stock price movement beyond threshold
├── 🌡️ Weather condition changes
├── 📊 Market data updates
└── 🔔 Social media mentions or sentiment changes
```

#### Data Change Triggers

Activate agents when specific data conditions are met:

```json Data Trigger Configuration theme={null}
{
  "sales_threshold_trigger": {
    "trigger_type": "data_change",
    "data_source": "crm_system",
    "conditions": {
      "metric": "daily_sales",
      "operator": "greater_than",
      "threshold": 10000,
      "time_window": "today"
    },
    "agent_action": {
      "agent_id": "celebration_notifier",
      "parameters": {
        "message_type": "achievement",
        "recipients": "sales_team"
      }
    }
  },
  "inventory_alert": {
    "trigger_type": "data_change",
    "data_source": "inventory_system",
    "conditions": {
      "any_product": {
        "stock_level": "less_than",
        "threshold": 10,
        "category": "high_priority"
      }
    },
    "agent_action": {
      "agent_id": "inventory_manager",
      "parameters": {
        "action": "reorder_analysis",
        "urgency": "high"
      }
    }
  }
}
```

#### File and Document Triggers

Respond to file uploads, changes, or document processing events:

```plaintext File-Based Triggers theme={null}
📁 File Event Triggers:

📤 Upload Events:
├── 📊 New spreadsheet uploaded → Data analysis agent
├── 📝 Contract document added → Legal review agent
├── 📷 Image uploaded → Content processing agent
└── 📄 Report submitted → Approval workflow agent

🔄 File Changes:
├── ✏️ Document edited → Version control agent
├── 🔒 File permissions changed → Security audit agent
├── 📁 Folder structure modified → Organization agent
└── 🗑️ File deleted → Backup verification agent

⚡ Processing Events:
├── ✅ OCR processing completed → Text analysis agent
├── 🔍 Document indexed → Search update agent
├── 🎯 Classification completed → Routing agent
└── 📊 Data extraction finished → Integration agent
```

### Conditional and Advanced Scheduling

#### Multi-Condition Triggers

Complex logic combining multiple conditions:

```json Advanced Conditional Scheduling theme={null}
{
  "complex_market_analysis": {
    "trigger_type": "multi_condition",
    "logic": "AND",
    "conditions": [
      {
        "type": "time",
        "market_hours": true,
        "day_of_week": ["monday", "tuesday", "wednesday", "thursday", "friday"]
      },
      {
        "type": "data",
        "source": "market_data",
        "metric": "volatility_index",
        "operator": "greater_than",
        "value": 20
      },
      {
        "type": "external_event",
        "source": "news_feed",
        "keyword_match": ["earnings", "acquisition", "merger"],
        "sentiment": "significant"
      }
    ],
    "agent_config": {
      "agent_id": "market_event_analyzer",
      "priority": "high",
      "parameters": {
        "analysis_depth": "comprehensive",
        "include_predictions": true
      }
    }
  }
}
```

#### Cascading Workflows

Chain multiple agents in sequence with conditional logic:

```plaintext Workflow Orchestration Example theme={null}
🔄 Quarterly Report Workflow:

1️⃣ Data Collection Agent (Day 1 of Quarter End)
├── 📊 Gather financial data from accounting system
├── 📈 Collect sales metrics from CRM
├── 👥 Retrieve HR data for headcount/productivity
└── ✅ Trigger next step when all data collected

2️⃣ Analysis Agent (Triggered by Step 1 Completion)
├── 📊 Perform financial analysis and calculations
├── 📈 Generate trend comparisons with previous quarters
├── 🎯 Identify key insights and recommendations
└── ✅ Trigger report generation when analysis complete

3️⃣ Report Generation Agent (Triggered by Step 2)
├── 📝 Create executive summary document
├── 📊 Generate charts and visualizations
├── 📧 Format for different stakeholder groups
└── ✅ Trigger distribution when report ready

4️⃣ Distribution Agent (Triggered by Step 3)
├── 📧 Send to board members and executives
├── 📱 Post summary to internal communication channels
├── 📁 Archive in document management system
└── 📊 Track delivery and engagement metrics
```

## Schedule Management

### Schedule Configuration

#### Visual Schedule Builder

Intuitive interface for creating complex schedules:

```plaintext Schedule Builder Interface theme={null}
🎛️ Visual Schedule Configuration:

📅 Calendar View:
├── 📊 Drag-and-drop schedule creation
├── 🔄 Visual repeat pattern selection
├── ⚠️ Conflict detection and resolution
├── 📈 Capacity planning and load balancing
└── 🎯 Timeline visualization with dependencies

⚙️ Advanced Options:
├── 🌍 Multi-timezone support and coordination
├── 🔄 Holiday and business day handling
├── 📊 Resource allocation and limits
├── 🚨 Error handling and retry policies
└── 📝 Custom notification and alerting rules

🧪 Testing and Simulation:
├── 🔍 Schedule dry-run and validation
├── 📊 Performance impact estimation
├── ⏰ Execution time prediction
└── 🎯 Optimization recommendations
```

#### Bulk Schedule Operations

Manage multiple schedules efficiently:

```json Bulk Schedule Management theme={null}
{
  "bulk_operations": {
    "create_department_schedules": {
      "operation": "bulk_create",
      "template": "department_reporting_template",
      "departments": ["sales", "marketing", "engineering", "finance"],
      "customizations": {
        "sales": {
          "frequency": "daily",
          "time": "09:00",
          "reports": ["pipeline", "conversion", "forecast"]
        },
        "marketing": {
          "frequency": "weekly",
          "day": "monday",
          "time": "08:00",
          "reports": ["campaigns", "attribution", "leads"]
        }
      }
    },
    "seasonal_adjustments": {
      "operation": "bulk_modify",
      "filter": {
        "tags": ["reporting", "analysis"],
        "frequency": "daily"
      },
      "changes": {
        "holiday_period": {
          "reduce_frequency": true,
          "new_frequency": "weekly",
          "date_range": ["2024-12-20", "2024-01-05"]
        }
      }
    }
  }
}
```

### Monitoring and Analytics

#### Execution Tracking

Comprehensive monitoring of scheduled agent runs:

```plaintext Schedule Monitoring Dashboard theme={null}
📊 Schedule Execution Monitoring:

🎯 Performance Metrics:
├── ✅ Success Rate: 98.7% (last 30 days)
├── ⏱️ Average Execution Time: 2.3 minutes
├── 🔄 On-Time Execution: 99.2%
├── 🚨 Failed Executions: 1.3% (12 of 924)
├── ⏰ Retry Success Rate: 89.1%
└── 📈 Resource Utilization: 67% average

📅 Schedule Health:
├── 🟢 Active Schedules: 45 running normally
├── ⚠️ Warning Schedules: 3 with minor issues
├── 🔴 Failed Schedules: 1 requires attention
├── ⏸️ Paused Schedules: 7 temporarily disabled
└── 📊 Total Executions Today: 127

🚨 Recent Alerts:
├── ⚠️ "Daily Sales Report" - 15 min delay (network issue)
├── 🔴 "Inventory Check" - Failed 3 times (authentication error)
├── 📊 "Market Analysis" - High resource usage detected
└── ✅ "Customer Feedback" - Resumed after temporary pause
```

#### Performance Optimization

Automatic optimization of schedule performance:

```plaintext Performance Optimization Features theme={null}
⚡ Automatic Performance Optimization:

🔄 Load Balancing:
├── 📊 Intelligent schedule distribution across time slots
├── 🎯 Avoid peak execution periods when possible
├── 📈 Dynamic capacity allocation based on complexity
└── ⚖️ Resource usage balancing across agent types

⏰ Timing Optimization:
├── 🧠 AI-powered optimal execution time suggestions
├── 📊 Historical performance pattern analysis
├── 🔄 Automatic adjustment for improved reliability
└── 🎯 Dependency-aware scheduling to minimize delays

🚨 Proactive Problem Detection:
├── 📈 Trend analysis for performance degradation
├── 🔍 Early warning system for potential failures
├── 🔄 Automatic retry strategy optimization
└── 📊 Resource bottleneck identification and resolution
```

## Advanced Scheduling Features

### Multi-Agent Orchestration

#### Parallel Execution

Run multiple agents simultaneously for efficiency:

```plaintext Parallel Agent Execution theme={null}
🔄 Parallel Execution Strategies:

⚡ Independent Parallel Tasks:
├── 📊 Data Collection: CRM, Marketing, Finance (simultaneous)
├── 🔍 Analysis Tasks: Multiple market segments (parallel)
├── 📧 Notifications: Different stakeholder groups (concurrent)
└── 🧹 Maintenance: System cleanup tasks (simultaneous)

🎯 Coordinated Parallel Workflows:
├── 📊 Phase 1: Data gathering agents (all start together)
├── ⏰ Phase 2: Wait for all Phase 1 completion
├── 📈 Phase 3: Analysis agents using combined data
└── 📝 Phase 4: Report generation with all insights

⚖️ Resource-Aware Execution:
├── 🧠 Dynamic parallelism based on system capacity
├── 📊 Priority-based resource allocation
├── 🔄 Automatic scaling and throttling
└── 🎯 SLA-aware execution prioritization
```

#### Sequential Dependencies

Manage complex workflows with dependencies:

```json Dependency Management Example theme={null}
{
  "customer_lifecycle_workflow": {
    "workflow_type": "sequential_with_conditions",
    "stages": [
      {
        "stage": "lead_qualification",
        "agent": "lead_scorer",
        "success_criteria": {
          "score": "greater_than_70"
        },
        "on_success": "proceed_to_nurturing",
        "on_failure": "assign_to_manual_review"
      },
      {
        "stage": "lead_nurturing",
        "agent": "nurture_automation",
        "dependencies": ["lead_qualification"],
        "conditions": {
          "lead_score": "above_threshold",
          "engagement_level": "sufficient"
        },
        "duration": "7_days",
        "success_criteria": {
          "engagement_increase": "20_percent"
        }
      },
      {
        "stage": "sales_handoff",
        "agent": "sales_coordinator",
        "dependencies": ["lead_nurturing"],
        "conditions": {
          "nurtured_score": "sales_ready",
          "sales_team_capacity": "available"
        },
        "notifications": {
          "sales_rep": "immediate",
          "manager": "daily_summary"
        }
      }
    ]
  }
}
```

### Intelligent Scheduling

#### AI-Powered Optimization

Machine learning-driven schedule optimization:

```plaintext AI-Driven Schedule Intelligence theme={null}
🧠 AI-Powered Schedule Optimization:

📊 Pattern Recognition:
├── 🎯 Optimal execution time prediction based on historical data
├── 📈 Resource demand forecasting for capacity planning
├── 🔄 Failure pattern analysis for proactive prevention
└── ⏰ Performance optimization recommendations

🎯 Adaptive Scheduling:
├── 🧠 Learning from execution success/failure patterns
├── 📊 Dynamic adjustment based on system performance
├── 🔄 Automatic rescheduling for optimal outcomes
└── 📈 Continuous improvement through feedback loops

🚨 Predictive Maintenance:
├── 🔍 Early detection of potential schedule conflicts
├── 📊 Resource exhaustion prediction and prevention
├── ⚡ Automatic failover and backup scheduling
└── 🔄 Proactive optimization before issues occur
```

#### Context-Aware Scheduling

Schedules that adapt to business context and external factors:

```json Context-Aware Configuration theme={null}
{
  "context_aware_scheduling": {
    "market_analysis_agent": {
      "base_schedule": "every_4_hours_business_days",
      "context_adjustments": {
        "earnings_season": {
          "frequency": "every_hour",
          "priority": "high",
          "additional_data_sources": ["earnings_calendar", "analyst_reports"]
        },
        "market_volatility_high": {
          "frequency": "every_30_minutes",
          "enable_alerts": true,
          "expanded_analysis": true
        },
        "holiday_periods": {
          "frequency": "daily",
          "reduced_scope": true,
          "focus": "international_markets"
        }
      }
    },
    "customer_service_agent": {
      "base_schedule": "continuous_monitoring",
      "context_adjustments": {
        "high_ticket_volume": {
          "increase_capacity": "200_percent",
          "escalation_threshold": "lower",
          "additional_support": "enable"
        },
        "business_hours": {
          "response_time_target": "5_minutes",
          "quality_checks": "enabled"
        },
        "after_hours": {
          "response_time_target": "30_minutes",
          "escalation_only": "urgent_issues"
        }
      }
    }
  }
}
```

## Best Practices

### Effective Schedule Design

1. **Start Simple, Scale Gradually**
   ```plaintext Progressive Scheduling Approach theme={null}
   📈 Schedule Development Strategy:
   ├── 1️⃣ Begin with basic time-based schedules
   ├── 2️⃣ Add event triggers for critical processes
   ├── 3️⃣ Introduce conditional logic for flexibility
   ├── 4️⃣ Implement multi-agent workflows
   ├── 5️⃣ Add AI optimization and learning
   └── 6️⃣ Scale to organization-wide automation
   ```

````
2. **Design for Reliability**
   ```plaintext Reliability Best Practices
🛡️ Reliability Design Principles:
   ├── 🔄 Implement comprehensive error handling and retries
   ├── 📊 Set up monitoring and alerting for all schedules
   ├── 🔧 Design idempotent operations for safe retries
   ├── ⏰ Use appropriate timeouts and resource limits
   ├── 📝 Maintain detailed logs for troubleshooting
   └── 🧪 Test schedules thoroughly before production deployment
````

3. **Optimize for Performance**
   ```plaintext Performance Optimization Guidelines theme={null}
   ⚡ Performance Best Practices:
   ├── 📊 Balance load across time periods to avoid peaks
   ├── 🎯 Use parallel execution where dependencies allow
   ├── 📈 Monitor resource usage and optimize accordingly
   ├── 🔄 Implement intelligent caching for repeated operations
   ├── 📊 Regular performance reviews and optimization
   └── 🧠 Leverage AI recommendations for schedule improvements
   ```

```

## Troubleshooting

### Common Scheduling Issues

#### Schedule Execution Failures
**Problem**: Scheduled agents fail to execute or complete successfully
**Solutions**:
- Check agent configuration and parameter validity
- Verify external service connectivity and authentication
- Review resource availability and system capacity
- Examine error logs for specific failure reasons
- Test agent execution manually to isolate issues

#### Timing and Synchronization Problems
**Problem**: Schedules execute at wrong times or out of sequence
**Solutions**:
- Verify timezone configurations across all systems
- Check for daylight saving time handling
- Review dependency chains and conditional logic
- Validate external trigger configurations
- Monitor system clock synchronization

#### Performance and Resource Issues
**Problem**: Scheduled agents consume excessive resources or run slowly
**Solutions**:
- Review and optimize agent complexity and resource usage
- Implement better load balancing across time periods
- Add resource limits and throttling mechanisms
- Scale infrastructure capacity if consistently overloaded
- Optimize data processing and external API calls

## Related Features

- [Agent Creation](/agents/creating) - Build agents for scheduled automation
- [Agent Running](/agents/running) - Manual agent execution and management
- [Integration Setup](/integrations/setup) - Connect external triggers and data sources

## What's Next?

Ready to automate your workflows with intelligent agent scheduling? Here are your next steps:

1. **[Create your first agent](/agents/creating)** for automated tasks
2. **[Set up external integrations](/integrations/setup)** for triggers and data
3. **[Review agent running guide](/agents/running)** to track performance
4. **[Explore workflow automation](/agents/collaboration)** for complex processes

---

*Need help with advanced scheduling scenarios? Contact our [support team](/support/contact) or check our [agent examples](/agents/examples).*
```
