Overview
Mission Control’s scheduler runs automated maintenance tasks in the background without manual intervention. Handle database backups, stale data cleanup, agent heartbeat checks, webhook retries, and Claude Code session scanning.The scheduler initializes automatically on startup and runs tasks based on configured intervals. No user action required.
Accessing Scheduler Status
Via API
Query scheduler status programmatically:Scheduled Tasks
Five background tasks run automatically:1. Auto Backup
Purpose: Create database backups to prevent data loss. Schedule: Daily at ~3 AM UTC (relative to process start time) What It Does:
Configuration:
Backup File Format
Backup File Format
Filenames follow the pattern:
mc-backup-YYYY-MM-DD_HH-MM-SS.dbExample: mc-backup-2026-03-04_03-00-00.db2. Auto Cleanup
Purpose: Remove stale records based on retention policies. Schedule: Daily at ~4 AM UTC What It Does:
Configuration:
Set retention to
0 to disable cleanup for a specific record type. Records will be kept indefinitely.3. Agent Heartbeat Check
Purpose: Mark agents offline if they haven’t sent a heartbeat recently. Schedule: Every 5 minutes What It Does:
Configuration:
4. Webhook Retry
Purpose: Retry failed webhook deliveries with exponential backoff. Schedule: Every 60 seconds What It Does:
Configuration:
Circuit Breaker Behavior
Circuit Breaker Behavior
After 5 consecutive failures, the webhook enters “circuit open” state:
- No further retry attempts
- Delivery status set to
circuit_open - Operator notification created
- Manual intervention required to reset
5. Claude Session Scan
Purpose: Auto-discover and track local Claude Code sessions. Schedule: Every 60 seconds What It Does:
Configuration:
Claude Code must be installed and have at least one project for scanning to work. Sessions are marked active if updated within the last hour.
Task Configuration
Enable/disable tasks via Settings API:Enable a Task
Disable a Task
View All Settings
Retention Policies
Configure how long records are kept:- Activities
- Audit Log
- Notifications
- Pipeline Runs
- Token Usage
Key:
retention.activitiesDefault: 90 daysActivity feed entries (task updates, agent changes, etc.)Set Retention Policy
Scheduler Initialization
The scheduler starts automatically when Mission Control launches:- Agent Sync — Sync agents from
openclaw.jsonon startup - Task Registration — Register all 5 background tasks
- Staggered Start — Backup scheduled for ~3 AM, cleanup for ~4 AM (relative to start time)
- Tick Loop — Check every 60 seconds for due tasks
Startup Log
Monitoring Task Execution
Last Run Information
Each task tracks:- lastRun — Timestamp of most recent execution
- nextRun — Timestamp of next scheduled execution
- running — Boolean indicating if task is currently executing
- lastResult — Result of most recent execution:
ok— Success/failure booleanmessage— Human-readable summarytimestamp— When result was recorded
Example Result Messages
- Auto Backup:
"Backup created (2456KB)" - Auto Cleanup:
"Cleaned 147 stale records" - Heartbeat Check:
"All agents healthy"or"Marked 2 agent(s) offline: researcher-01, analyst-02" - Webhook Retry:
"Retried 3 deliveries: 2 succeeded, 1 failed" - Claude Scan:
"Synced 2 sessions: mission-control, demo-project"
Audit Trail
All scheduled task executions are logged to the audit trail:Troubleshooting
Task Not Running
Task Not Running
- Check if task is enabled in settings
- Verify
nextRuntimestamp is in the past - Confirm scheduler initialized (check startup logs)
- Look for errors in
lastResult.message
Backup Failing
Backup Failing
- Verify
.data/backups/directory exists and is writable - Check disk space:
df -h .data/ - Review permissions:
ls -la .data/backups/ - Check audit log for detailed error message
Cleanup Not Deleting Records
Cleanup Not Deleting Records
- Confirm retention policies are set (not 0)
- Verify records are older than retention days
- Check if task is enabled:
general.auto_cleanup = true - Manually trigger cleanup and review result
Agents Marked Offline Too Quickly
Agents Marked Offline Too Quickly
Increase timeout:
Best Practices
Backup Strategy
Retention Tuning
- High-traffic systems — Reduce retention to 30-60 days to save disk space
- Audit compliance — Increase audit log retention to 365+ days
- Development — Use shorter retention (7-14 days) to keep database small
Heartbeat Tuning
- Reliable networks — 10-minute timeout is fine
- Unreliable networks — Increase to 20-30 minutes to avoid false positives
- Local development — Consider disabling heartbeat checks entirely
Next Steps
Agent Management
Configure agent heartbeat intervals and SOUL files
Real-Time Monitoring
Monitor task execution in the activity feed