Overview
The Scheduler API provides visibility into Mission Control’s background task system. The scheduler runs several automated maintenance tasks:- Auto Backup - Daily database backups at 3:00 AM UTC
- Auto Cleanup - Daily data pruning at 4:00 AM UTC based on retention policies
- Agent Heartbeat - Agent liveness checks every 5 minutes
- Webhook Retry - Failed webhook delivery retries every 60 seconds
- Claude Session Scan - Active session monitoring every 60 seconds
Get Scheduler Status
Returns the current state of all scheduled tasks including next run times and last execution results.Response
Array of scheduled task status objects
Task identifier (
auto_backup, auto_cleanup, agent_heartbeat, webhook_retry, claude_session_scan)Human-readable task name
Whether the task is currently enabled (controlled via settings)
Unix timestamp (milliseconds) of last execution, or null if never run
Unix timestamp (milliseconds) of next scheduled execution
Whether the task is currently executing
Example Response
Trigger Scheduled Task
Manually execute a scheduled task immediately, bypassing the normal schedule. Useful for testing or running on-demand backups.Request Body
Task to trigger. Must be one of:
auto_backup- Create database backup immediatelyauto_cleanup- Run data cleanup based on retention policiesagent_heartbeat- Check agent liveness and mark stale agents offline
Response
Whether the task executed successfully
Result message with execution details or error information
Example Responses
Successful BackupCron Configuration
Backup Schedule
- Frequency: Daily at 3:00 AM UTC
- Interval: 24 hours
- Control Setting:
general.auto_backup(boolean) - Retention: Keeps last N backups (configured via
general.backup_retention_count)
Cleanup Schedule
- Frequency: Daily at 4:00 AM UTC
- Interval: 24 hours
- Control Setting:
general.auto_cleanup(boolean) - Target Tables: activities, audit_log, notifications, pipeline_runs, token_usage
- Retention Policies: Configured per table via
retention.*settings
Agent Heartbeat
- Frequency: Every 5 minutes
- Control Setting:
general.agent_heartbeat(default: enabled) - Timeout: Configurable via
general.agent_timeout_minutes(default: 10) - Action: Marks agents offline if no heartbeat received within timeout period
Webhook Retry
- Frequency: Every 60 seconds
- Control Setting:
webhooks.retry_enabled(default: enabled) - Purpose: Retry failed webhook deliveries with exponential backoff
Claude Session Scan
- Frequency: Every 60 seconds
- Control Setting:
general.claude_session_scan(default: enabled) - Purpose: Monitor and sync active Claude Desktop sessions
Enabling/Disabling Tasks
Tasks are controlled via the Settings API. Use the settings keys listed in each task’s “Control Setting” field.Error Responses
400 Bad Request
Invalid task_id provided. Must be one of: auto_backup, auto_cleanup, agent_heartbeat
401 Unauthorized
User is not authenticated. Check session cookie.
403 Forbidden
User does not have admin role. Only admins can control the scheduler.
500 Internal Server Error
Task execution failed. Check the response message for error details.