-
-
Notifications
You must be signed in to change notification settings - Fork 3
Scheduler and Jobs
CortexPrism edited this page Jun 17, 2026
·
1 revision
CortexPrism includes a SQLite-persisted cron job scheduler for running background tasks, memory consolidation, and user-defined jobs.
The scheduler daemon runs as part of the supervisor process:
supervisor-process.ts
└── scheduler-process.ts ← DB polling: runs cron jobs every 30s
memory consolidation, scheduled commands
-
pending— Scheduled, waiting for execution -
running— Currently executing -
completed— Finished successfully -
failed— Finished with error -
cancelled— Manually cancelled
Failed jobs are automatically retried with exponential backoff.
cortex jobs list # List all jobs
cortex jobs list --status pending # Filter by status
cortex jobs create <name> <cron> <command> # Create a scheduled job
cortex jobs delete <job-id> # Remove a job
cortex jobs trigger <job-id> # Run a job immediately
cortex jobs cancel <job-id> # Cancel a running jobStandard 5-field cron:
minute hour day month weekday
Examples:
-
0 * * * *— Every hour -
0 2 * * *— Every day at 2 AM -
*/30 * * * *— Every 30 minutes
The scheduler automatically runs:
- Hourly: Episodic memory consolidation
- Daily: Semantic decay updates
- Weekly: Reflection pattern consolidation
When pluginUpdate.checkOnStartup is enabled, the scheduler periodically checks for plugin updates.
| Method | Path | Description |
|---|---|---|
GET |
/api/jobs?status=pending |
List jobs |
POST |
/api/jobs |
Create a job |
POST |
/api/jobs/:id/cancel |
Cancel a job |
POST |
/api/jobs/:id/trigger |
Trigger immediately |
DELETE |
/api/jobs/:id |
Delete a job |
The Jobs tab in the Web UI shows:
- All scheduled jobs with status indicators
- Next run time
- Last execution result
- Manual trigger and cancel buttons
- Daemon Supervisor — How the scheduler fits into the daemon architecture
- Memory System — Memory consolidation tasks
CortexPrism — Open-source agentic AI harness · MIT License · Built with Deno 2.x + TypeScript