Documentation Index
Fetch the complete documentation index at: https://mintlify.com/chaos-mesh/chaos-mesh/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Chaos Mesh Schedules enable you to run chaos experiments automatically at specified times or intervals using cron syntax. This is useful for continuous chaos engineering, periodic resilience testing, and automated fault injection.Schedule Structure
A Schedule wraps any chaos experiment type and executes it according to a defined schedule.Schedule Specification
Cron expression or predefined schedule defining when the chaos experiment runs.Examples:
"@every 5s"- Every 5 seconds"@every 1m"- Every minute"@every 1h"- Every hour"@hourly"- Same as0 * * * *"@daily"- Same as0 0 * * *"*/5 * * * *"- Every 5 minutes"0 9 * * 1-5"- 9 AM weekdays
The type of chaos experiment to schedule. Must be one of:
PodChaosNetworkChaosStressChaosIOChaosTimeChaosHTTPChaosDNSChaosKernelChaosJVMChaosAWSChaosGCPChaosAzureChaosBlockChaosPhysicalMachineChaos
Optional deadline in seconds for starting the job if it misses scheduled time for any reason. Missed jobs executions will be counted as failed ones.Must be greater than 0.
Specifies how to handle concurrent executions of the scheduled chaos experiment.
Forbid(default): Do not allow concurrent runs. Skip new run if previous is still active.Allow: Allow concurrent runs. Multiple instances of the experiment can run simultaneously.
Number of completed chaos experiment records to retain for this schedule. Must be at least 1.This helps manage resource usage by cleaning up old experiment objects.
Cron Syntax
Chaos Mesh supports the standard cron format with optional seconds field:Special Strings
@every <duration>
Run at the specified interval. Duration can use units:
s, m, h.Examples: @every 30s, @every 5m, @every 2h@hourly
Run once an hour at the beginning of the hour. Equivalent to
0 * * * *.@daily
Run once a day at midnight. Equivalent to
0 0 * * *.@weekly
Run once a week at midnight on Sunday. Equivalent to
0 0 * * 0.@monthly
Run once a month at midnight on the first day. Equivalent to
0 0 1 * *.@yearly
Run once a year at midnight on January 1st. Equivalent to
0 0 1 1 *.Schedule Examples
Network Chaos Every 5 Minutes
Pod Chaos During Business Hours
Stress Chaos Every 30 Seconds
Daily Database Chaos
Schedule Status
Current state of the schedule.
Managing Schedules
Creating a Schedule
Viewing Schedule Status
Pausing a Schedule
You can pause a schedule without deleting it by adding a pause annotation:Deleting a Schedule
Deleting a schedule does not automatically delete chaos experiments that are currently running. Those will complete based on their duration settings.
Schedules in Workflows
You can embed scheduled chaos within workflow templates:Best Practices
Choose Appropriate Intervals
Choose Appropriate Intervals
Balance testing frequency with system stability. Start with longer intervals and decrease gradually as confidence grows.
Set History Limits
Set History Limits
Configure
historyLimit to prevent accumulation of old experiment objects that consume cluster resources.Use Forbid for Safety
Use Forbid for Safety
Default to
concurrencyPolicy: Forbid to prevent overlapping chaos experiments that could compound failures.Consider Time Zones
Consider Time Zones
Cron schedules use the timezone of the Chaos Mesh controller. Ensure your schedule accounts for the controller’s timezone.
Monitor Schedule Health
Monitor Schedule Health
Track schedule execution through the dashboard or Prometheus metrics to detect missed executions or failures.
Next Steps
Workflows
Combine scheduled chaos with complex workflow orchestration
Status Checks
Add automated validation to scheduled experiments
Monitoring
Track schedule metrics with Prometheus
Dashboard
View and manage schedules through the web UI