ai-scheduler
Kodachi Scheduler Daemon - Cron-based command scheduling with security whitelist
Version: 9.0.1 | Size: 4.0MB | Author: Warith Al Maawali
License: Proprietary | Website: https://www.digi77.com
File Information
| Property | Value |
|---|---|
| Binary Name | ai-scheduler |
| Version | 9.0.1 |
| Build Date | 2026-02-26T08:01:54.969933937Z |
| Rust Version | 1.82.0 |
| File Size | 4.0MB |
| JSON Data | View Raw JSON |
SHA256 Checksum
Features
| Feature | Description |
|---|---|
| Feature | Cron expression parsing ("0 * * * *") |
| Feature | Event-driven triggers |
| Feature | Command whitelist validation |
| Feature | Execution history tracking |
Security Features
| Feature | Description |
|---|---|
| Inputvalidation | All inputs are validated and sanitized |
| Ratelimiting | Built-in rate limiting for network operations |
| Authentication | Secure authentication with certificate pinning |
| Encryption | TLS 1.3 for all network communications |
System Requirements
| Requirement | Value |
|---|---|
| OS | Linux (Debian-based) |
| Privileges | root/sudo for system operations |
| Dependencies | OpenSSL, libcurl |
Global Options
| Flag | Description |
|---|---|
-h, --help |
Print help information |
-v, --version |
Print version information |
-n, --info |
Display detailed information |
-e, --examples |
Show usage examples |
--json |
Output in JSON format |
--json-pretty |
Pretty-print JSON output with indentation |
--json-human |
Enhanced JSON output with improved formatting (like jq) |
--verbose |
Enable verbose output |
--quiet |
Suppress non-essential output |
--no-color |
Disable colored output |
--config <FILE> |
Use custom configuration file |
--timeout <SECS> |
Set timeout (default: 30) |
--retry <COUNT> |
Retry attempts (default: 3) |
Commands
Daemon Control
start
Start the scheduler daemon
Usage:
Schedule Management
add
Add a new scheduled task
Usage:
list
List all scheduled tasks
Usage:
remove
Remove a scheduled task
Usage:
Operational Scenarios
Scenario-oriented workflows generated from the binary's built-in -e --json examples.
Scenario 1: Daemon Control
Start and manage the scheduler daemon
Step 1: Start scheduler daemon
Expected Output: Scheduler daemon started successfullyNote
Runs as background service
Step 2: Start in foreground mode for debugging
Expected Output: Scheduler running in foreground with live outputNote
Useful for debugging and testing scheduled tasks
Step 3: Foreground mode with JSON status output
Expected Output: JSON events as tasks are scheduled and executedNote
Combines debug visibility with structured output
Step 4: Start daemon with JSON status output
Expected Output: JSON response with daemon process infoNote
Useful for automated monitoring
Scenario 2: Schedule Management
Add, list, and remove scheduled tasks
Step 1: Schedule a daily network check at 8 AM
Expected Output: Task scheduled successfully with IDNote
Cron syntax: minute hour day month weekday
Step 2: Check Tor status every hour
Expected Output: Hourly task created successfullyNote
Executes at the start of each hour
Step 3: Schedule DNS leak check every 30 minutes with JSON output
Expected Output: JSON with task ID and schedule detailsNote
Full add command with all parameters and structured output
Step 4: Schedule weekly cleanup every Sunday at 2 AM
ai-scheduler add --name "weekly-cleanup" --command "health-control cleanup" --cron "0 2 * * 0" --json
Note
Weekday 0 = Sunday, 1 = Monday, etc.
Step 5: List all scheduled tasks
Expected Output: Table of scheduled tasks with IDs and statusNote
Shows task name, command, schedule, and next run
Step 6: List scheduled tasks as JSON
Expected Output: Task list in JSON formatNote
Structured output for automation
Step 7: Remove scheduled task by ID
Expected Output: Task removed successfullyNote
Use 'list' command to find task IDs
Step 8: Remove task with JSON confirmation
Expected Output: JSON response confirming task removalScenario 3: Gateway Core Policy Validation
Scheduler command validation is aligned with shared ai-gateway core policy and sanitization rules
Step 1: Valid passive command accepted by shared gateway-core validator
Expected Output: Task created successfullyStep 2: Unknown service is rejected by shared validator before scheduling
Expected Output: Validation error indicating service is blockedCommand Examples (Raw)
Daemon Control
Start and manage the scheduler daemon
Start scheduler daemon
Expected Output: Scheduler daemon started successfullyNote
Runs as background service
Start in foreground mode for debugging
Expected Output: Scheduler running in foreground with live outputNote
Useful for debugging and testing scheduled tasks
Foreground mode with JSON status output
Expected Output: JSON events as tasks are scheduled and executedNote
Combines debug visibility with structured output
Start daemon with JSON status output
Expected Output: JSON response with daemon process infoNote
Useful for automated monitoring
Schedule Management
Add, list, and remove scheduled tasks
Schedule a daily network check at 8 AM
Expected Output: Task scheduled successfully with IDNote
Cron syntax: minute hour day month weekday
Check Tor status every hour
Expected Output: Hourly task created successfullyNote
Executes at the start of each hour
Schedule DNS leak check every 30 minutes with JSON output
Expected Output: JSON with task ID and schedule detailsNote
Full add command with all parameters and structured output
Schedule weekly cleanup every Sunday at 2 AM
ai-scheduler add --name "weekly-cleanup" --command "health-control cleanup" --cron "0 2 * * 0" --json
Note
Weekday 0 = Sunday, 1 = Monday, etc.
List all scheduled tasks
Expected Output: Table of scheduled tasks with IDs and statusNote
Shows task name, command, schedule, and next run
List scheduled tasks as JSON
Expected Output: Task list in JSON formatNote
Structured output for automation
Remove scheduled task by ID
Expected Output: Task removed successfullyNote
Use 'list' command to find task IDs
Remove task with JSON confirmation
Expected Output: JSON response confirming task removalGateway Core Policy Validation
Scheduler command validation is aligned with shared ai-gateway core policy and sanitization rules
Valid passive command accepted by shared gateway-core validator
Expected Output: Task created successfullyUnknown service is rejected by shared validator before scheduling
Expected Output: Validation error indicating service is blockedEnvironment Variables
| Variable | Description | Default | Values |
|---|---|---|---|
RUST_LOG |
Set logging level | info | error |
NO_COLOR |
Disable all colored output when set | unset | 1 |
Exit Codes
| Code | Description |
|---|---|
| 2 | Invalid arguments |
| 5 | File not found |
| 1 | General error |
| 3 | Permission denied |
| 4 | Network error |
| 0 | Success |