Skip to content
CAI
Software that uses CAICheck a score

commanded/commanded-scheduler

52.0

Adequate · 21 September 2026

1.2k

lines of production code

Elixir

primary language

7

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is a command scheduling service built on the Commanded framework, designed to manage the execution of background jobs. It provides capabilities to schedule one-off, recurring, and batched commands for delayed or periodic execution. The system persists job metadata and state to a database and includes built-in retry logic for failed jobs.

Features

Add command scheduling capabilities

The Commanded library now includes a new \Commanded.Scheduler\ module that allows users to schedule one-off or batched commands to be dispatched at a specific date and time. This feature introduces \schedule\_once\ for single commands, \schedule\_batch\ for atomic groups of commands, and \cancel\_schedule\ to remove pending jobs. Users can now integrate scheduled command execution directly into their CQRS/ES applications.

lib/commanded · high confidence

Add database schema for scheduled jobs and projection versions

The application now persists scheduled jobs and projection versions to the database. A new 'schedules' table is introduced with a composite primary key (schedule\_uuid and name) to store job details such as command, command type, due date, and schedule configuration. Additionally, a 'projection\_versions' table is created to track the last seen event number for each projection, ensuring that the system can reliably manage and schedule jobs based on their state.

priv · high confidence

Introduce scheduled job execution and management

Added new modules to the Commanded scheduler to support scheduling, executing, and managing background jobs. This includes a \Job\ GenServer for executing commands with automatic retry logic, a \JobSupervisor\ to manage job processes, and a \Jobs\ GenServer that maintains an in-memory schedule of one-off and recurring jobs. Users can now schedule one-off or recurring jobs to run at specific times, cancel scheduled jobs, and view pending or running jobs.

lib/commanded/scheduler/jobs · high confidence

Introduce structured types and serialization for scheduled commands

The scheduler now uses explicit structs to represent scheduling states and actions, including ScheduleOnce, ScheduleRecurring, ScheduleBatch, CancelSchedule, and TriggerSchedule. These types support scheduling one-off and recurring commands, batch scheduling, and cancellation. The change also adds JSON serialization and deserialization for state events (ScheduledOnce, ScheduledRecurring, ScheduleTriggered, ScheduleCancelled) via a Convert module that maps string types to Elixir structs, enabling proper encoding/decoding of scheduled command data.

lib/commanded/scheduler/schedule · high confidence

Behavioural changes

Configures scheduled job execution intervals and database connections for the scheduler

The application's configuration has been restructured to support scheduled job execution. The main config file now sets a default schedule interval of 60 seconds and max retries, while environment-specific files (dev, test, prod) define the Postgres database connection details for the Commanded scheduler. The test environment is further configured with a 500ms schedule interval and an in-memory event store for unit testing.

config · high confidence

Introduce batch scheduling and job execution infrastructure

The scheduler now supports scheduling commands in batches, including both one-off and recurring jobs via the new \Commanded.Scheduler.Batch\ module. The system has been restructured to include a dedicated Ecto repository (\Commanded.Scheduler.Repo\) for persistence, a router (\Commanded.Scheduler.Router\) that dispatches schedule, cancel, and trigger commands, and an updated application supervisor that registers key components like the job runner, job supervisor, and scheduling services.

lib/commanded/scheduler · medium confidence

Introduce scheduled command dispatch via new scheduling components

The scheduler now supports dispatching commands at specific times. This is enabled by new modules in the scheduling layer: a \Dispatcher\ that routes commands through the configured router, a \Projection\ that persists schedule metadata (UUID, name, command, due date) to the \schedules\ table, and a \Scheduling\ event handler that processes \ScheduledOnce\, \ScheduleTriggered\, and \ScheduleCancelled\ events to manage job lifecycles. The system also includes error handling with configurable retry logic for failed event processing.

lib/commanded/scheduler/scheduling · high confidence

Migrate from Quantum to Ecto for job scheduling

The library has been refactored to remove the dependency on the Quantum scheduling library, shifting to Ecto for persistence. This change simplifies the scheduling mechanism by allowing commands to be scheduled directly via the \Commanded.Scheduler\ module or by dispatching scheduled commands through the app's router or process managers, as detailed in the updated README and usage guides.

(repo-wide) · medium confidence

Test coverage

Added test coverage for the scheduler API; Added test support domain for scheduled command dispatch; Added test support infrastructure for the scheduler; Added tests for scheduler job execution; Added tests for the scheduler's dispatch, persistence, and error handling; Added tests for the scheduler's schedule once and recurring capabilities; Removed empty scheduler test file.

Dependencies

Upgrade Commanded dependency and add new dependencies

The project now depends on Commanded version 0.18.0, up from 0.15.0. Additionally, new dependencies have been added: Commanded Ecto Projections (0.8.0), Crontab (1.1.5), Ecto (3.1.1), Elixir UUID (1.2.0), Ex2MS (1.5.0), Postgrex, and Timex (3.5.0).

(dependencies) · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 53 → 52 (-1.1)
  • Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 100 → 100 (+0.2)
  • Architecture 69 → 69 (+0.0)
  • Maturity 40 → 40 (+0.0)
  • Readiness 43 → 44 (+1.4)
  • Security 97 → 78 (-18.9)
  • Event Sourcing 100 → 100 (+0.0)

Resolved (10)

  • Change coupling: jobs.ex ↔ scheduling.ex (lib/commanded/scheduler/jobs/jobs.ex)
  • Coverage not included — suite not readable by the collector
  • Dependency hygiene not measured — no supported dependency manifest was read
  • Duplicated block (7 lines × 2) (lib/commanded/scheduler/schedule/schedule.ex)
  • High CVE: [GHSA redacted] (mix.lock)
  • Medium CVE: EEF-[CVE redacted] (mix.lock)
  • No exposed public API
  • Test reliability not included
  • The README describes only one scheduling method (Commanded.Scheduler.schedule_once) with a Usage example but omits the alternative dispatch path and gets started entirely. (README.md)
  • dormant codebase — no living knowledge left to concentrate

New (23)

  • Documentation: no installation or build instructions (README.md)
  • Documentation: no usage examples (README.md)
  • Duplicated block (8–10 lines × 2) (lib/commanded/scheduler/schedule/schedule.ex)
  • High CVE: [GHSA redacted] (mix.lock)
  • Medium CVE: EEF-[CVE redacted] (mix.lock)
  • No SBOM
  • No artifact signing
  • No build provenance
  • No dependency advisory monitoring
  • Outdated: commanded
  • Outdated: commanded_ecto_projections
  • Outdated: crontab
  • Outdated: ecto
  • Outdated: elixir_uuid
  • Outdated: ex2ms
  • Outdated: ex_doc
  • Outdated: jason
  • Outdated: mix_test_watch
  • Outdated: postgrex
  • Outdated: timex
  • …and 3 more

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

commanded/commanded-scheduler was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 21 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 9df1efe78bb11acb9f2163fe8472361c105cb0d4 — the exact code this score is about.
  • Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-b84573e22831.