CronManager
YAML-driven cron scheduler for HTTP requests and shell scripts. Rust reimplementation of buerokratt/CronManager (originally a Spring Boot + Quartz application built at the Estonian Information System Authority).
Point CronManager at a folder of YAML job files. Each job becomes a scheduled task — a Quartz-style cron expression fires either an outbound HTTP call or a shell command. Manual triggers, per-job retry, and time-window (start/end) constraints are first-class. Execution history is persisted to TimescaleDB when configured.
Version: 0.3.0-alpha · License: Apache-2.0
· Repo: turnerrainer/cronmanager
· Images: docker.io/turnerrainer/cronmanager:alpha, ghcr.io/turnerrainer/cronmanager:alpha
One-command demo
docker run -d --name cronmanager -p 8080:8080 \
turnerrainer/cronmanager:alpha
curl http://localhost:8080/health # {"status":"ok"}
curl -s http://localhost:8080/jobs | head # loaded jobs, JSON
The demo image bakes in a small set of sample HTTP + shell jobs
under /app/DSL/samples/. They tick immediately so you can watch
them fire in the logs:
docker logs -f cronmanager
Read in order
- Getting started — install, run, add your own job
- Configuration —
cronmanager.yamlfield reference - Samples cookbook — copy-paste snippets for every feature
- JVM porting quickref — one-page field-by-field guide for operators moving from the Spring Boot / Quartz original
- Failure modes — every HTTP status CronManager emits
Getting started
Install, run, verify, and add your first job. Aim: under five minutes from clone to first fire.
Prerequisites
- Docker + Docker Compose (any recent version)
- OR Rust 1.88+ if building from source
Run it
With Docker (fastest):
docker run -d --name cronmanager -p 8080:8080 \
turnerrainer/cronmanager:alpha
With Docker Compose (includes TimescaleDB for execution history):
git clone -b dev https://github.com/turnerrainer/cronmanager.git
cd cronmanager
docker compose up -d
From source:
git clone -b dev https://github.com/turnerrainer/cronmanager.git
cd cronmanager
cargo run --release
Verify it
curl http://localhost:8080/health
{"status":"ok"}
List loaded jobs:
curl -s http://localhost:8080/jobs
The response is { "<group>": [ { "name": …, "schedule": …, "nextExecution": … }, … ] }.
Groups are derived from the directory layout under dsl_path —
DSL/samples/http/health-check.yaml becomes group
samples-http-health-check.
Add your first HTTP job
Create DSL/mine/ping.yaml:
ping_google:
trigger: "0 */5 * * * ?"
type: http
method: GET
url: https://www.google.com/
retryCount: 2
retryDelay: 1000
ignoreFailures: true
Restart the container (or send POST /reload/samples-mine-ping if
already running):
docker compose restart cronmanager
curl -s http://localhost:8080/jobs | grep ping_google
Add your first shell job
Put your script under scripts/mine/hello.sh:
#!/usr/bin/env bash
echo "hello from $(hostname), backup dir is ${BACKUP_DIR:-unset}"
Register it in DSL/mine/hello.yaml:
say_hello:
trigger: "0 * * * * ?"
type: exec
command: ./scripts/mine/hello.sh
allowedEnvs:
- BACKUP_DIR
allowedEnvs is an opt-in whitelist. Only listed variables from
shell_environment in cronmanager.yaml are exported to the
process. See Configuration for the full env
model.
Trigger a job manually
Every job — even one with trigger: off — can be fired ad hoc:
curl -X POST http://localhost:8080/execute/samples-mine-hello/say_hello
Read the execution history
When a Postgres URL is configured (see Configuration), every attempt is recorded. Query it directly:
docker exec -it cronmanager-timescaledb \
psql -U cronmanager -d cronmanager \
-c 'SELECT job_name, status, execution_time FROM job_execution_history ORDER BY execution_time DESC LIMIT 10;'
Where to next
- Configuration — every field of
cronmanager.yaml - Failure modes — what each HTTP status means
Configuration
Everything is one YAML file: cronmanager.yaml. Search order:
--config <path>CLI flagCRONMANAGER_CONFIGenv var./cronmanager.yamlor./cronmanager.yml- Built-in defaults
Full example
port: 8080
dsl_path: /app/DSL/samples
app_root_path: /app
allowed_origins:
- "http://localhost"
- "http://127.0.0.1"
shell_environment:
BACKUP_DIR: /tmp/backups
RETENTION_DAYS: "7"
limits:
max_request_bytes: 1048576
max_response_bytes: 16777216
request_timeout_secs: 30
shell_timeout_secs: 300
database:
url: postgres://cronmanager@timescaledb:5432/cronmanager
password_env: CRONMANAGER_DB_PASSWORD
Field reference
| Field | Type | Default | Meaning |
|---|---|---|---|
port | integer | 8080 | TCP port the axum server binds on 0.0.0.0. |
dsl_path | path | ./DSL | Directory scanned recursively for .yaml/.yml job files at startup. |
app_root_path | path | /app | Working directory used when a shell job executes. |
allowed_origins | list of strings or comma-separated string | [] | CORS allow-list. Empty list disables the CORS layer. Exact-match only (no wildcards). |
shell_environment | map of string→string | {} | Baseline env exposed to shell jobs. Each job still whitelists via allowedEnvs. |
limits.max_request_bytes | integer | 1048576 (1 MiB) | Cap for inbound REST bodies. Overflow → 413. |
limits.max_response_bytes | integer | 16777216 (16 MiB) | Cap for HTTP responses stored in history. Overflow → truncated with marker. |
limits.request_timeout_secs | integer | 30 | HTTP outbound timeout for HTTP jobs. 0 disables the cap (a WARN is emitted at boot). |
limits.shell_timeout_secs | integer | 300 | Shell job wall-clock cap. Overrun → SIGKILL + TIMEOUT history entry. 0 disables the cap (a WARN is emitted at boot). |
database.url | connection string | (unset) | PostgreSQL/TimescaleDB DSN without credentials. When unset, execution history is disabled. |
database.password_env | env var name | CRONMANAGER_DB_PASSWORD | Env var to read the DB password from. Startup refuses if database.url is set but the env var is missing. |
admin.bearer_token_env | env var name | CRONMANAGER_ADMIN_TOKEN | Env var containing the bearer token that gates POST /execute, POST /stop, POST /reload. Empty/unset → gate disabled. |
admin.trust_network | bool | false | Skip the boot-time refusal to start on a non-loopback bind without a token. Only safe when a reverse proxy / service mesh authenticates every request before it reaches this process. |
security.block_private_networks | bool | true | Refuse HTTP job URLs whose host is a private / loopback / link-local / ULA IP, both at load (literal IPs) and at fire time (DNS resolution). |
security.allowed_private_hosts | list of hostnames | [] | Hostnames HTTP jobs may reach on private / loopback / ULA addresses while block_private_networks stays true. Exact, case-insensitive match on the URL host; no wildcards, no IP literals (ignored with a doctor WEAK). Link-local / cloud metadata (169.254.0.0/16, fe80::/10, fd00:ec2::254) stays refused even for listed hosts. Use for cluster-internal targets instead of turning the SSRF guard off. |
security.allow_dangerous_env_overrides | bool | false | Bypass the shell dangerous-env blacklist (PATH, LD_*, DYLD_*, PYTHONPATH, NODE_OPTIONS, …). |
security.max_query_params | integer | 64 | Cap on the number of ?k=v pairs on POST /execute/…. Overflow → 413 too_many_query_params. |
security.max_dsl_file_bytes | integer | 1048576 (1 MiB) | Per-file cap on YAML DSL size, refused at load with a diagnostic that names the file. |
security.dsl_load_timeout_secs | integer | 15 | Wall-clock cap on load_all. Above → boot / reload aborts with a dsl load exceeded …s error. |
security.max_retry_count | integer | 10 | Cap on the retryCount DSL field. Above → load rejected. WARN emitted at retryCount > 5. |
security.min_cron_interval_secs | integer | 10 | WARN if a cron expression fires more often than this. 0 disables the warning. |
security.stored_response_body_max_bytes | integer | 65536 (64 KiB) | Cap on response_body per history row. Above → head+tail slice with an inline truncation marker. |
security.reload_min_interval_secs | integer | 60 | Minimum seconds between two POST /reload/… calls for the same group. Above → 429 too_many_requests. 0 disables the throttle. |
security.expose_jobs_publicly | bool | true | When false, GET /jobs, /jobs/, /jobs/{group} require the admin bearer token (401 otherwise). Backward-compat default is true so an upgrade from 0.1.4-alpha keeps operator dashboards working; a boot WARN fires when this is left true AND a token is configured. |
security.expose_running_publicly | bool | true | Same posture as expose_jobs_publicly but for /running*. Time-attack signal — flip to false for internet-exposed deployments. |
security.per_group_token_envs | map of group → env var name | {} | Optional scoped tokens. When populated, requests to /execute/:group/:job, /stop/:group/:job, /reload/:group are accepted with EITHER the master admin token OR the group-specific token (constant-time compare on both). Groups not in the map only accept the master. Values are env var names — the file never contains a raw token. |
security.allow_dev_fixture_dsls | bool | false | Opt-out for the FLEET §11.3 gate that refuses dev-fixture DSL files (dev-login, mock-, -mock, /test/, example-, -example, /dev/, /mocks/) in non-dev environments. When true, matching files load with only a WARN in every environment. |
Security posture
Zero-config on loopback stays open (the gate short-circuits when
no token is set) so docker run -p 127.0.0.1:8080:8080 still gives
you the JVM-like local dev experience. Bind to 0.0.0.0 without a
token and the process refuses to start with:
Error: refusing to start on non-loopback bind 0.0.0.0:8080 without
an admin token: set env var CRONMANAGER_ADMIN_TOKEN to enable the
/execute + /stop + /reload gate, or set admin.trust_network=true
if a reverse proxy / service mesh authenticates every request
before it reaches this process
Callers present the token as Authorization: Bearer <token>. The
comparison is constant-time (subtle::ConstantTimeEq) and the
scheme name is case-insensitive per RFC 6750 §2.1.
Every admin-gate reject emits a structured WARN with a PII-safe client-IP hash (SHA-256, 4-byte prefix) and the matched route pattern, so a burst attack pattern is derivable from logs without exposing raw IPs:
WARN auth: rejected admin request
client_ip_hash=a1b2c3d4 route=/execute/:group/:job
reason="token does not match expected"
Read-only endpoints (/health, /healthz, /actuator/*) always
stay public regardless of any other setting. /jobs* and
/running* default to public but can be gated per
security.expose_jobs_publicly / security.expose_running_publicly.
admin.trust_network=true opts out of the boot-time refuse-to-
start on non-loopback binds without a token; it does NOT disable
the admin gate itself when a token IS set. A deployment behind a
mesh authenticating every request can safely flip
trust_network=true and STILL enforce the bearer token as
belt-and-braces.
Per-group admin tokens
For deployments where multiple integration partners share access
to the scheduler, security.per_group_token_envs scopes credential
blast radius:
security:
per_group_token_envs:
payroll: PAYROLL_ADMIN_TOKEN
logistics: LOGISTICS_ADMIN_TOKEN
Each group listed above accepts either the master CRONMANAGER_ADMIN_TOKEN
OR the group-specific token. Groups not in the map only accept the
master. Missing env vars emit a WARN at boot and the group falls
back to master-only (never silently 401s an ops caller who thinks
they have a group token).
Environment-aware boot safety gates
Set APP_ENV (or ENVIRONMENT / DEPLOY_ENV) to production,
staging, or test for any deployment above local dev. In those
environments boot REFUSES when:
- Weak or default credentials are detected — admin token
matches
changeit/password/01234/dev-/-test/test-admin-token/ etc; or is shorter than 32 chars (admin token) / 12 chars (DB password); or is empty. - Unsafe posture flags are set —
admin.trust_network=true,security.block_private_networks=false, orsecurity.allow_dangerous_env_overrides=true. - A dev-fixture DSL is present in the
dsl_pathtree — any file whose path matchesdev-login,mock-,-mock,/test/,example-,-example,/dev/, or/mocks/. The refusal names the file + matched pattern. Setsecurity.allow_dev_fixture_dsls=trueto downgrade to WARN when a deployment deliberately ships a mock DSL (contract-test rig, staging harness). The shippedDSL/samples/tree does NOT trip any of these patterns.
Both refusals emit a multi-line diagnostic naming each failing
item with a redacted value (01****ef) and its remediation. In
APP_ENV=dev (or unset) the same conditions produce WARN lines
and boot continues — preserving the zero-config loopback UX.
Unknown values (APP_ENV=prroduction) fail-safe to Production.
Unknown fields are hard errors
Every config struct is validated with serde(deny_unknown_fields).
A typo like dslpath: (missing underscore) or an accidental
retryDelayy: in a job file fails at load, not at first fire.
The error names the offending field:
error: invalid config file ./cronmanager.yaml: unknown field
`dslpath`, expected one of `port`, `dsl_path`, `app_root_path`,
`allowed_origins`, `shell_environment`, `limits`, `database`
JVM-compat aliases
Copied a JVM application.yml field-by-field? The camelCase names
also bind:
| JVM name | Rust name |
|---|---|
configPath | dsl_path |
appRootPath | app_root_path |
allowedOrigins | allowed_origins |
shellEnvironment | shell_environment |
allowed_origins additionally accepts the JVM comma-separated
string form:
allowed_origins: "localhost,192.168.10.1,127.0.0.1"
...deserialises to the same value as:
allowed_origins:
- localhost
- 192.168.10.1
- 127.0.0.1
JVM Spring wrappers are rejected
If you paste a JVM application.yml verbatim, the top-level
application: / spring: / management: / logging: keys are
caught at boot with a diagnostic that names the wrapper and shows
the fix:
error: invalid config file ./cronmanager.yaml: top-level `spring:`
is the JVM Spring wrapper. CronManager uses a flat config
schema — unwrap the child fields to the top level (e.g.
`application.configPath: X` becomes `dsl_path: X` at the top
level; `spring.datasource.*` becomes `database.url` + env-var
`CRONMANAGER_DB_PASSWORD`).
Boot-time diagnostics
At startup CronManager emits one INFO line summarising every field, plus WARNs for values likely to surprise an operator:
INFO config: port=8080 dsl_path=./DSL app_root_path=/app origins=1 shell_env_keys=2 history_db=true limits[req=1048576,resp=16777216,http_to=30s,shell_to=300s]
WARN config: allowed_origins contains "*" — the CORS layer matches exactly and does NOT treat "*" as a wildcard; list every allowed origin explicitly
WARN config: limits.shell_timeout_secs=0 disables the shell wall-clock cap — a runaway process will not be SIGKILLed
A quick boot-log read tells you whether the process is running on defaults, whether history persistence is on, and whether any config value is nudging you toward a footgun.
YAML job file shape
Each .yaml file under dsl_path is a map from job name to a job
definition. Example:
health_check:
trigger: "0 */5 * * * ?"
type: http
method: GET
url: https://httpbin.org/status/200
retryCount: 3
retryDelay: 1000
ignoreFailures: true
daily_backup:
trigger: "0 0 2 * * ?"
type: exec
command: ./scripts/samples/backup.sh
allowedEnvs:
- BACKUP_DIR
- RETENTION_DAYS
Common job fields:
| Field | Applies to | Meaning |
|---|---|---|
trigger | all | Quartz cron expression (6 fields) OR one of the manual-mode literals (see below). |
type | all | http or exec. Any other value fails at load. |
startDate | all | Unix millis; job silently skips fires before this. |
endDate | all | Unix millis; job silently skips fires after this. |
retryCount | all | Number of retries after the first attempt. Default 0. |
retryDelay | all | Sleep between retries in milliseconds. Default 1000. |
ignoreFailures | all | If true, absorb all-attempts-failed. Default false. |
method | http | One of GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS. Any other value fails at load. |
url | http | Full URL. |
headers | http | Optional map of extra request headers with literal values. Not for secrets. See below. |
headerEnvs | http | Optional map of header name → env-var name. The value is read from the process environment at each fire and never stored, logged or persisted. For service tokens. |
command | exec | Accepts EITHER a whitespace-tokenised string (JVM Runtime.exec(String) parity — no shell interpretation, no quoting) OR an explicit YAML list. See below. |
allowedEnvs | exec | List of env var names to export from shell_environment into the child process. |
headers: and headerEnvs: — extra request headers
call_internal_api:
trigger: "0 0 4 ? * SUN"
type: http
method: POST
url: http://internal-api:8080/cron/job
headers:
X-Source: cronmanager
headerEnvs:
X-Internal-Service-Token: INTERNAL_SERVICE_TOKEN
headerEnvsholds env-var names (same convention assecurity.per_group_token_envs); keep secrets out of the YAML.- The env var must be set and a valid header value when the file
loads, otherwise that file is skipped with an ERROR (fail early,
not on the first fire). The value is re-read on every fire, so
rotating it needs no
/reload. - Header names are case-insensitive and normalised to lower case. Setting the same header in both maps is a load error.
Host,Content-Length,Transfer-Encoding,Connection,Upgrade,TEandTrailercannot be set.- Values from
headerEnvsare marked sensitive in the HTTP client and are not logged or written to history.
command: — two forms
The string form matches JVM parity: whitespace-split, no shell.
Values containing spaces cannot be quoted; if you need shell
semantics, use the list form with an explicit sh -c prefix.
# String form — one argv element per whitespace-separated token.
command: /bin/echo hello world
command: ./scripts/samples/backup.sh /var/lib/data
# List form — each element is one argv entry, verbatim.
command: ['/bin/sh', '-c', 'sleep 30; echo done']
command:
- /usr/bin/python3
- -c
- "import time; time.sleep(30); print('done')"
The string "/bin/sh -c \"sleep 30\"" in string form tokenises to
["/bin/sh", "-c", "\"sleep", "30\""] and the child shell exits
with Syntax error: Unterminated quoted string. That's the
signature of "use the list form here".
Empty string / empty list is refused at load with command field is empty. Both forms normalise to a single argv vector before the
shell executor sees them.
Manual-mode literals
Any of the following makes a job manual-only (fires only via
POST /execute/...):
- YAML
false(bool) - YAML
off(bare word — YAML 1.2 parses this as a string) - Case-insensitive strings
"off","false","no","disabled"
trigger: true is explicitly rejected — it's almost always a
typo for either a cron expression or one of the manual literals.
Group names are derived from the file's path relative to
dsl_path, with directory separators replaced by - and the
extension dropped. DSL/samples/http/health-check.yaml yields
group samples-http-health-check.
For a large bank of copy-paste job samples, see Samples cookbook.
REST API surface
| Method | Path | Auth | Purpose |
|---|---|---|---|
GET | / | none | Sentinel string CronManager started. |
GET | /health | none | Liveness probe. Returns {"status":"ok"}. |
GET | /healthz | none | K8s convention alias for /health (identical body). Registered so livenessProbe: httpGet defaults work without a token. |
GET | /actuator/health | none | JVM URL alias for /health (identical body). |
GET | /actuator/info | none | Minimal build info: {"name":"cronmanager","version":"…"}. |
GET | /jobs, /jobs/, /jobs/{group} | conditional | Public by default; require admin bearer token when security.expose_jobs_publicly=false. |
GET | /running, /running/, /running/{group} | conditional | Public by default; require admin bearer token when security.expose_running_publicly=false. |
POST | /execute/{group}/{job} | admin gate | Fire a job now. Optional query params for shell jobs are matched against allowedEnvs. Returns the running-jobs snapshot. |
POST | /stop/{group}/{job} | admin gate | Best-effort abort. Returns {"stopped": bool, "running": [...]}. |
POST | /reload/{group} | admin gate | Re-scan dsl_path and re-register jobs. Returns {"reloaded": N}. Throttled per group via security.reload_min_interval_secs. |
Every response carries
- Five defense-in-depth security headers —
Content-Security-Policy: default-src 'none'; frame-ancestors 'none',Strict-Transport-Security: max-age=63072000; includeSubDomains; preload,X-Frame-Options: DENY,X-Content-Type-Options: nosniff,Referrer-Policy: no-referrer. Emitted regardless of route so a proxy-bypassing dev bind still ships defense-in-depth. - W3C Trace Context headers —
traceparent: 00-<trace_id>-<span_id>-01andx-trace-id: <trace_id>. Inboundtraceparentis inherited when well-formed; otherwise a fresh 32-hex uuid is generated.
Every completed request logs one line
INFO http_request_completed method=X route=Y status=Z duration_us=... trace_id=... — matched route pattern only (never raw URI), never headers, never bodies. See the "Access logging" section below.
See Failure modes for the status codes each endpoint can return.
Environment overrides
Three env vars are read directly by the process (never a config field):
| Env var | Purpose |
|---|---|
CRONMANAGER_CONFIG | Absolute path to cronmanager.yaml. Overrides the search order. |
CRONMANAGER_ADMIN_TOKEN (or whatever admin.bearer_token_env names) | Admin bearer token gating /execute + /stop + /reload. Empty/unset → gate short-circuits (only safe on loopback). |
CRONMANAGER_DB_PASSWORD (or whatever database.password_env names) | The DB password. Absence fails startup when database.url is set. |
Any env var named in security.per_group_token_envs | Optional per-group tokens (see above). Missing envs WARN at boot; groups fall back to master-only. |
APP_ENV / ENVIRONMENT / DEPLOY_ENV | Deployment classifier — production, staging, test, dev (default). Non-dev values REFUSE to boot on weak credentials or unsafe posture flags. Unknown values fail-safe to Production. |
CRONMANAGER_OFFLINE | When set to true / 1 / yes / on (case-insensitive), every job dispatch — HTTP and shell alike — is short-circuited. Each fire records one history row with status=OFFLINE; no network call, no child process. Boot emits a WARN so the operator sees the lever is engaged. Reset by unsetting the variable and restarting. |
RUST_LOG | tracing_subscriber filter — e.g. info, cronmanager=debug, info,cronmanager=trace. |
cronmanager doctor — offline config audit
Run cronmanager doctor (no server binding, no DB access) to
replay every check the boot path runs. It prints one severity-
prefixed line per finding and exits 1 on any FATAL:
cronmanager doctor — production environment
[INFO ] port: bind port 8080
[INFO ] dsl_path: DSL directory: /app/DSL/samples
[INFO ] admin.token: admin bearer token resolved from env
[FATAL] refuse_to_start: process would REFUSE to boot: non-loopback bind 0.0.0.0:8080 without an admin token and admin.trust_network=false
[WEAK ] security.expose_jobs_publicly: GET /jobs is anonymous even though an admin token is configured
summary: 1 fatal, 0 break, 1 weak, 3 info
Severity ladder:
FATAL— refuse-to-start conditions in the target env (env_safety+refuse_to_start_without_token). Exit code 1.BREAK— the process WILL fail at runtime even if it boots (missing env var referenced by config, unreachable DSL directory).WEAK— insecure default that boot only WARNs about.INFO— descriptive facts (bind, dsl_path, history).
Wire into CI or container HEALTHCHECK for pre-deploy auditing.
Graceful shutdown
The process installs SIGTERM (unix) and SIGINT (Ctrl+C) handlers.
On either signal axum::serve drains in-flight requests before
resolving, then the process exits cleanly. docker stop / k8s pod
eviction get the full grace window (default 10s in Docker,
terminationGracePeriodSeconds in k8s) instead of ripping sockets
mid-request. Look for INFO shutdown: SIGTERM received, draining in-flight requests and INFO shutdown complete in the log stream.
Access logging
Every completed HTTP request emits one INFO line (SOC 2 CC7.2 / ISO 27001 A.12.4 access-log compliance):
INFO http_request_completed method=POST route=/execute/:group/:job
status=200 duration_us=1234 trace_id=<32-hex>
- Route pattern only — never raw URI, so query strings and path traversal attempts stay out of logs.
- Never logs headers or bodies — no
Authorization, no body content, no client-controlled data. - trace_id is inherited from the inbound
traceparentheader when present, else generated. Used to correlate with Ruuter and downstream services in the Buerostack topology.
Auth failures on /execute, /stop, /reload additionally emit
a WARN with a PII-safe SHA-256 short-hash of the client IP and the
matched route pattern — enough to build a blocklist from log data
without exposing raw IPs.
Log stream is plain-text under Docker / systemd
tracing_subscriber::fmt() only emits ANSI colour codes when
stderr is a TTY. Container / systemd logs are ANSI-free — SIEM
parsers (Splunk, Datadog, Loki) see clean bytes.
Samples cookbook
Copy-paste ready snippets covering every feature. Drop each into a
.yaml file under dsl_path — filenames are free-form, group
names are derived from the file's path relative to dsl_path.
For the field reference behind every key, see Configuration.
HTTP jobs
Simplest possible HTTP job
health_check:
trigger: "0 */5 * * * ?" # every 5 minutes
type: http
method: GET
url: https://httpbin.org/status/200
HTTP job with retry + ignoreFailures
external_service:
trigger: "0 */2 * * * ?" # every 2 minutes
type: http
method: GET
url: https://httpbin.org/status/503
retryCount: 3 # 3 retries after the first attempt = 4 attempts total
retryDelay: 2000 # 2 s between attempts
ignoreFailures: true # don't mark the schedule as failing
POST with a payload URL
CronManager's HTTP jobs send requests but don't shape the body — if you need a payload, use a target that echoes / accepts a static request, or point at an intermediary that constructs it (Ruuter, DataMapper).
post_webhook:
trigger: "0 0 * * * ?" # top of every hour
type: http
method: POST
url: https://httpbin.org/post
retryCount: 3
retryDelay: 2000
PUT / DELETE / PATCH
Every method in GET / POST / PUT / DELETE / PATCH / HEAD / OPTIONS
is accepted:
put_update:
trigger: "0 30 */6 * * ?" # every 6 hours at :30
type: http
method: PUT
url: https://httpbin.org/put
retryCount: 5
retryDelay: 3000
delete_cleanup:
trigger: "0 0 3 * * ?" # daily at 03:00 UTC
type: http
method: DELETE
url: https://httpbin.org/delete
HTTP job with a start / end window
Only fires while now is within [startDate, endDate] (Unix
milliseconds). Outside the window, the fire is recorded as
SKIPPED in history.
time_bounded:
trigger: "0 0 */2 * * ?" # every 2 hours
type: http
method: GET
url: https://httpbin.org/get
startDate: 1704067200000 # 2024-01-01T00:00:00Z
endDate: 1735689600000 # 2025-01-01T00:00:00Z
Manual-only HTTP job
manual_api_call:
trigger: off # bare word 'off' — never fires automatically
type: http
method: GET
url: https://httpbin.org/uuid
Manual-mode variants that all mean the same thing:
also_manual_a:
trigger: false # bool
type: http
method: GET
url: https://x
also_manual_b:
trigger: "disabled" # case-insensitive string
type: http
method: GET
url: https://x
Fire the manual job via:
curl -X POST http://localhost:8080/execute/<group>/<name>
Shell jobs
Simplest possible shell job
say_hello:
trigger: "0 * * * * ?" # every minute
type: exec
command: /bin/echo hello world
The command is whitespace-tokenised — no shell interpretation.
For pipes / redirects / substitution, invoke /bin/sh -c "..."
explicitly.
Shell job with baseline environment
shell_environment in cronmanager.yaml provides the pool;
allowedEnvs in the job spec is the opt-in whitelist.
# cronmanager.yaml
shell_environment:
BACKUP_DIR: /var/backups/cronmanager
RETENTION_DAYS: "7"
# DSL/samples/shell/backup.yaml
daily_backup:
trigger: "0 0 2 * * ?" # daily at 02:00 UTC
type: exec
command: ./scripts/samples/backup.sh
allowedEnvs:
- BACKUP_DIR
- RETENTION_DAYS
The script sees only BACKUP_DIR and RETENTION_DAYS. Any other
key in shell_environment is not exported.
Shell job with query-param env overrides
POST /execute/<group>/<job>?FOO=bar treats query params as env
overrides — but only if the key is in allowedEnvs:
# job
seed_data:
trigger: off
type: exec
command: ./scripts/seed.sh
allowedEnvs:
- SEED_COUNT
# Fire it with an override
curl -X POST 'http://localhost:8080/execute/samples-shell-seed_data/seed_data?SEED_COUNT=1000'
# Query params not in allowedEnvs are silently dropped:
curl -X POST 'http://localhost:8080/execute/samples-shell-seed_data/seed_data?SEED_COUNT=1000&SECRET_KEY=abc'
# SEED_COUNT reaches the child; SECRET_KEY does not.
Long-running shell job with timeout override
A job whose runtime routinely exceeds the default 5-minute wall
clock — configure a larger cap globally in cronmanager.yaml:
# cronmanager.yaml
limits:
shell_timeout_secs: 3600 # 1 hour
The wall-clock cap is process-wide, not per-job. Individual jobs that need to run longer than the process cap have to split themselves into smaller units, or the cap has to be raised.
Manual-only shell job
Same pattern as HTTP:
manual_script:
trigger: off
type: exec
command: /usr/local/bin/rebuild-cache.sh
Schedule pattern cookbook
Every cron here parses with the cron crate the same way it
does under Quartz. The trailing ? in day-of-month or day-of-week
means "no specific value" and is required whenever the other
day field is a literal.
every_minute:
trigger: "0 * * * * ?"
type: http
method: GET
url: https://httpbin.org/get
every_30_seconds:
trigger: "*/30 * * * * ?"
type: http
method: GET
url: https://httpbin.org/get
hourly_on_the_hour:
trigger: "0 0 * * * ?"
type: http
method: GET
url: https://httpbin.org/get
daily_at_0230:
trigger: "0 30 2 * * ?"
type: http
method: GET
url: https://httpbin.org/get
weekday_morning:
trigger: "0 0 9 ? * MON-FRI"
type: http
method: GET
url: https://httpbin.org/get
monday_only:
trigger: "0 0 8 ? * MON"
type: http
method: GET
url: https://httpbin.org/get
first_of_month:
trigger: "0 0 0 1 * ?"
type: http
method: GET
url: https://httpbin.org/get
sunday_maintenance:
trigger: "0 0 3 ? * SUN"
type: http
method: GET
url: https://httpbin.org/get
twice_daily:
trigger: "0 0 6,18 * * ?" # 06:00 and 18:00 UTC
type: http
method: GET
url: https://httpbin.org/get
The scheduler runs in UTC. Adjust hour fields for your local
offset — a job that should fire at 09:00 Europe/Tallinn (UTC+2 in
winter, UTC+3 in summer) needs its hour cron field set to 7
(winter) or 6 (summer).
Config cookbook
Minimal cronmanager.yaml (defaults)
Every field has a sensible default. This is the smallest working file:
dsl_path: /app/DSL
Omitting the file entirely also works — CronManager falls back to
built-in defaults and logs using built-in defaults.
Enable execution history
database:
url: postgres://cronmanager@timescaledb:5432/cronmanager
Set the password out-of-band:
export CRONMANAGER_DB_PASSWORD='...'
Startup will fail-loud if database.url is set and the env var
is missing — no silent history-disabled state.
Tighter resource caps
limits:
max_request_bytes: 65536 # 64 KiB inbound REST bodies
max_response_bytes: 1048576 # 1 MiB captured HTTP responses
request_timeout_secs: 10 # fast-fail slow upstreams
shell_timeout_secs: 60 # kill any shell job > 1 min
Loose resource caps (aggregators, long jobs)
limits:
max_response_bytes: 67108864 # 64 MiB
request_timeout_secs: 120 # tolerate slow scrapers
shell_timeout_secs: 3600 # backups can take up to 1 h
CORS enabled (browser callers)
allowed_origins:
- https://dashboard.example.com
- https://admin.example.com
Or, JVM-style:
allowed_origins: "https://dashboard.example.com,https://admin.example.com"
* is not treated as a wildcard by the CORS layer — it's an
exact-match origin. A boot-time WARN fires if you set it, because
that's almost never what you meant.
Manual-only deployment
For a CronManager used only as an operator-controlled runner
(no automatic schedules), every job carries trigger: off and
fires via POST /execute/.... Nothing in cronmanager.yaml
changes — the schedule is per-job.
Docker Compose sample
services:
timescaledb:
image: timescale/timescaledb:latest-pg16
environment:
POSTGRES_USER: cronmanager
POSTGRES_PASSWORD: cronmanager_password
POSTGRES_DB: cronmanager
volumes:
- timescale-data:/var/lib/postgresql/data
cronmanager:
image: turnerrainer/cronmanager:alpha
ports: ["8080:8080"]
environment:
CRONMANAGER_DB_PASSWORD: cronmanager_password
RUST_LOG: info,cronmanager=debug
volumes:
- ./cronmanager.yaml:/app/cronmanager.yaml:ro
- ./DSL:/app/DSL:ro
- ./scripts:/app/scripts:ro
depends_on:
- timescaledb
restart: unless-stopped
volumes:
timescale-data:
The container is non-root (uid 1000) — make sure ./DSL and
./scripts are world-readable, or match ownership.
JVM porting quickref
For operators moving from
buerokratt/CronManager
(Spring Boot + Quartz). One page, field-by-field. If you copy
your JVM application.yml verbatim, boot will fail with a
diagnostic that names the change to make.
Config file
The Rust config schema is flat — no Spring application: /
spring: / management: / logging: wrapper. If those top-level
keys are present, boot refuses with a message that names the
wrapper and shows the fix.
| JVM field | Rust field | Notes |
|---|---|---|
application.configPath | dsl_path (alias configPath also accepted) | snake_case rename; alias binds either way |
application.appRootPath | app_root_path (alias appRootPath) | same |
application.allowedOrigins (String) | allowed_origins (list or comma-separated string; alias allowedOrigins) | Both forms work |
application.shellEnvironment (Map) | shell_environment (alias shellEnvironment) | same |
spring.datasource.url | database.url | Scheme postgres://, embed username in userinfo |
spring.datasource.username | (embed in database.url userinfo) | e.g. postgres://cronmanager@host/db |
spring.datasource.password | env var CRONMANAGER_DB_PASSWORD | Never in the file — env-only |
spring.jpa.*, spring.liquibase.* | (no target equivalent) | Rust runs sqlx::migrate! automatically |
management.endpoints.web.exposure.include | (no target equivalent) | Actuator URLs are directly registered — see Endpoints |
logging.level.* | env var RUST_LOG | e.g. info,cronmanager=debug |
| (no JVM equivalent — Spring default) | port: 8080 | Now explicit; default matches Spring |
| (no JVM equivalent) | limits.max_request_bytes (1 MiB) | Inbound REST body cap (413 on overflow) |
| (no JVM equivalent) | limits.max_response_bytes (16 MiB) | HTTP + shell output cap |
| (no JVM equivalent — RestClient default) | limits.request_timeout_secs (30) | Raise if your upstreams routinely exceed 30 s |
| (no JVM equivalent — no cap) | limits.shell_timeout_secs (300) | Wall-clock SIGKILL cap for shell jobs |
Env vars
| JVM | Rust |
|---|---|
SPRING_PROFILES_ACTIVE | (no equivalent — single YAML per env) |
TZ | (scheduler is UTC — adjust cron hours; see Timezone) |
SPRING_DATASOURCE_URL | Move into database.url |
SPRING_DATASOURCE_USERNAME | Embed in database.url userinfo |
SPRING_DATASOURCE_PASSWORD | CRONMANAGER_DB_PASSWORD |
| (no equivalent) | CRONMANAGER_CONFIG — override config file path |
| (no equivalent) | RUST_LOG — logging filter |
DSL / job YAML
Every JVM sample job file loads unchanged. No field renames,
no default changes, no semantic drift. The JVM sample corpus
(DSL/samples/**) is mirrored under compat/dsl/ and parsed by
CI on every build — that's how "unchanged" is enforced, not
promised.
Two hardening changes to be aware of, both fail-loud:
- Unknown DSL fields are hard errors. A typo like
retryCoun: 3— silently ignored on JVM — fails at load. - Unknown HTTP methods are hard errors at load. Only
GET/POST/PUT/DELETE/PATCH/HEAD/OPTIONSare accepted. A typo (GETT) or unusual method (TRACE,CONNECT) fails immediately instead of at first fire. Add a method to the whitelist if you need it — one line of Rust.
Additional trigger normalisations are additive (no JVM script breaks):
trigger: false(bool) still works.- Strings
off,false,no,disabledall normalise to manual mode (case-insensitive). trigger: trueis explicitly rejected — it would have been a parse-error on JVM too.
Endpoints
| JVM URL | Rust URL |
|---|---|
GET / | GET / — same body: CronManager started |
GET /jobs, /jobs/ | GET /jobs, /jobs/ (both work) |
GET /jobs/{group} | GET /jobs/{group} |
GET /running, /running/ | Both work |
POST /execute/.../... | Same |
POST /stop/.../... | Same URL. Response shape: {"stopped": bool, "running": [...]} — the JVM's running list is preserved on the same field name, plus a new stopped flag. |
POST /reload/{group} | Same URL. Response shape: {"reloaded": N} — full-tree reload; the group segment is currently accepted-but-ignored (diff-based reload is a backlog item). |
GET /actuator/health | GET /health and /actuator/health — both return {"status":"ok"}. No component tree — alerts that grep for components.db.status will silently miss. |
GET /actuator/info | Same URL. Body: {"name":"cronmanager","version":"…"} — no git, no build tree yet. |
Database
CronManager-on-Rust reads the exact same Liquibase schema. Point the Rust binary at an existing JVM database and it works, with one column-type ALTER:
ALTER TABLE job_execution_history
ALTER COLUMN execution_time TYPE TIMESTAMPTZ
USING execution_time AT TIME ZONE 'Europe/Tallinn';
Substitute 'Europe/Tallinn' for your JVM TZ. The JVM stored
TIMESTAMP (no timezone, interpreted as system-local); Rust
uses TIMESTAMPTZ (UTC-normalised). Skipping the ALTER causes
historical rows to be read at the wrong wall-clock time.
The two schema columns that neither impl populates
(retry_reason, stack_trace) stay in place.
Timezone
The Rust scheduler is UTC. A job that meant "09:00
Europe/Tallinn" needs its cron hour field manually adjusted.
| JVM cron (Tallinn, UTC+2 winter) | Meant | Rust cron (UTC) |
|---|---|---|
0 0 9 ? * MON-FRI | 09:00 weekdays | 0 0 7 ? * MON-FRI |
0 0 2 * * ? | 02:00 daily | 0 0 0 * * ? |
0 */5 * * * ? | every 5 min | unchanged |
DST is not modelled — a job that must fire "at 02:00 Tallinn local irrespective of DST" is not expressible in the current scheduler. Per-schedule TZ context is a backlog item.
Deploy diff
Docker Compose:
cronmanager:
image: turnerrainer/cronmanager:alpha
- environment:
- SPRING_PROFILES_ACTIVE: docker
- TZ: Europe/Tallinn
- SPRING_DATASOURCE_URL: jdbc:postgresql://timescaledb:5432/cronmanager
- SPRING_DATASOURCE_USERNAME: cronmanager
- SPRING_DATASOURCE_PASSWORD: cronmanager_password
+ environment:
+ CRONMANAGER_DB_PASSWORD: cronmanager_password
+ RUST_LOG: info,cronmanager=debug
volumes:
- ./cronmanager.yaml:/app/cronmanager.yaml:ro
- ./DSL:/app/DSL:ro
- ./scripts:/app/scripts:ro
Kubernetes:
env:
- name: CRONMANAGER_DB_PASSWORD
valueFrom:
secretKeyRef:
name: cronmanager-db
key: password
- name: RUST_LOG
value: "info,cronmanager=debug"
Rollback
Reversible in-place: revert the ALTER above, restore the JVM
application.yml, redeploy the JVM binary. Existing rows stay
readable on either side (Postgres coerces).
Failure modes
Every response CronManager emits carries a JSON body of the shape
{ "error": "<code>", "message": "<human>" } on failure.
HTTP status codes
| Status | error code | When |
|---|---|---|
200 | (no error field) | Success. Body carries the resource (list, snapshot, etc.). |
400 | bad_request | Malformed JSON body. |
400 | invalid_job_definition | A .yaml under dsl_path referenced an unknown type, unknown HTTP method, missing url/command, trigger: true, empty command, etc. |
400 | invalid_cron | A trigger: string that isn't parseable as a 6-field Quartz cron expression. |
400 | invalid_config | cronmanager.yaml contained a top-level JVM Spring wrapper (application:, spring:, …) or an unknown field. |
401 | unauthorized | Missing / wrong Authorization: Bearer <token> on an admin-gated endpoint (/execute, /stop, /reload; also /jobs* / /running* when security.expose_*_publicly=false). |
403 | forbidden | Dangerous env-var override on /execute?… (see security.allow_dangerous_env_overrides); or an HTTP job whose target failed the SSRF pre-flight. |
404 | job_not_found | /execute/{group}/{job} or /stop/{group}/{job} referenced a job that isn't scheduled. |
408 | (no body — tower_http) | Whole request exceeded limits.request_timeout_secs (slow-drip body upload, slow handler). Only emitted when the timeout is > 0. |
409 | job_already_running | /execute fired on a job whose previous invocation is still running. |
413 | request_too_large | Inbound body exceeded limits.max_request_bytes. |
413 | too_many_query_params | /execute?… exceeded security.max_query_params (default 64). Body carries count + limit. |
429 | too_many_requests | /reload/{group} fired within security.reload_min_interval_secs of the previous reload of the same group. Body carries retry_after_secs. |
500 | internal_error | Unexpected failure — check server logs. |
500 | shell_failed | Shell job exited non-zero. |
500 | shell_timeout | Shell job exceeded limits.shell_timeout_secs wall clock. |
500 | io_error | Filesystem or process I/O error (e.g. command script not found). |
500 | yaml_parse_error | A .yaml under dsl_path didn't parse — line/column in the message. |
500 | database_error | History persistence write failed. |
502 | upstream_http_error | HTTP job's target returned a non-2xx status after all retries exhausted. |
502 | upstream_body_too_large | HTTP job's target response exceeded limits.max_response_bytes. |
504 | upstream_timeout | HTTP job's target did not respond within limits.request_timeout_secs. |
For 413 request_too_large and 502 upstream_body_too_large the
JSON body also carries a "limit": <bytes> field so clients can
render the actual cap in their error UI. 413 too_many_query_params
carries both "count" and "limit". 429 too_many_requests
carries "retry_after_secs".
Job execution outcomes
Written to the job_execution_history.status column when
persistence is enabled:
| Value | Meaning |
|---|---|
SUCCESS | Attempt completed. HTTP: 2xx response. Shell: exit status 0. |
RETRYING | Attempt failed, another retry is queued. |
FAILED | Final attempt failed and ignoreFailures was false. |
SKIPPED | Fire suppressed by startDate/endDate window, or ignoreFailures: true swallowed a failure. |
TIMEOUT | Shell job exceeded limits.shell_timeout_secs and was killed. |
OFFLINE | Dispatch short-circuited by CRONMANAGER_OFFLINE=true (FLEET §9.1). No network call and no child process — one row per fire is still recorded so downstream reports know the outage lever is engaged. |
Common causes
- Job not firing on schedule: check that
triggeris a valid 6-field Quartz cron expression.0 */5 * * * ?(every five minutes) is a good sanity template. If the expression parses but the fire time never arrives, remember the scheduler evaluates in UTC — see Timezone below. - Boot fails with
unknown field 'X': a config or DSL typo. The error message lists the fields the loader expected — pick the closest match. Unlike the JVM CronManager, unknown fields are never silently ignored. - Boot fails with
top-level 'application:' is the JVM Spring wrapper: you pasted a JVMapplication.ymlverbatim. The Rust config schema is flat — unwrap the child fields to the top level. See JVM porting quickref. - Shell job fails immediately with
io_error: verify the script is executable (chmod +x) and the path is resolved relative toapp_root_path(default/app). - HTTP job times out: raise
limits.request_timeout_secsincronmanager.yaml, or reduce upstream latency. The default 30 s is generous; timeouts usually indicate a real upstream issue. - History not being written: confirm
database.urlis set and the env var named bydatabase.password_envis exported. The startup log linehistory: enabled/history: disabledtells you which mode the process is in. - CORS preflight fails despite
allowed_origins: ["*"]:*is treated as an exact origin by the CORS layer, not a wildcard. List every origin explicitly. A boot WARN fires when"*"is present so this isn't a silent surprise. - One job stopped firing after a config change: a per-file
DSL load error skips only that file (h2ck.me FN2 fix). Grep the
boot log for
dsl: skipping file due to load error— the ERROR line names the source path and reason. Sibling good files continue to load; boot succeeds with a summary WARN likedsl: N/M file(s) failed to load. - All jobs stopped after
/reload: ifdsl: no jobs loaded — every DSL file under X failed to parseappears, the whole tree is broken — the scheduler now has 0 jobs registered but the process is still up. Fix the DSL and re-reload. 401 unauthorizedonPOST /execute: token is missing, malformed, or wrong. The server-side WARN carries a PII-safe client-IP hash and the matched route so you can pattern-match in logs; the client sees only the generic JSON body.- Process refuses to start with
REFUSING TO START in Production: env-safety gate (APP_ENVnon-dev) found weak credentials or unsafe posture. The diagnostic lists every failing item with a redacted value; rotate the env var(s) or setAPP_ENV=devfor local development. 408 Request Timeouton a large upload: the whole-request wall-clock deadline (limits.request_timeout_secs, default 30 s) fired mid-body-read. Slow-drip and slow-loris style requests are bounded here. Raise the value or set it to0to disable (WARN emitted at boot).
Timezone
The scheduler evaluates in UTC. A job that must fire at "09:00
Europe/Tallinn" needs its cron hour field set to 7 (winter,
UTC+2) or 6 (summer, UTC+3). Per-schedule TZ context is
tracked as a backlog item.
Boot-time diagnostics
The process emits one INFO line at startup summarising every config field, plus WARNs for likely-footgun values. Reading the first 20 lines of the log is usually enough to answer "why is this behaving unexpectedly?":
INFO cronmanager v0.1.0-alpha.2 starting
INFO loaded config from ./cronmanager.yaml
INFO config: port=8080 dsl_path=./DSL app_root_path=/app origins=0 shell_env_keys=2 history_db=true limits[req=1048576,resp=16777216,http_to=30s,shell_to=300s]
INFO history: enabled (migrations applied)
INFO shell: baseline env has 2 entries
INFO dsl: loading ./DSL/samples/http/health-check.yaml
INFO dsl: group samples-http-health-check → 1 job(s)
INFO scheduler: adding samples-http-health-check/health_check trigger 0 */5 * * * ?
INFO scheduler: 1 job(s) registered
INFO listening on 0.0.0.0:8080
Changelog
All notable changes to CronManager will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
Unreleased
Security
- Fix the red
securityworkflow (daily scheduled runs failing since at least 2026-11-05). Three new RustSec advisories hit an unchangedCargo.lock:RUSTSEC-2026-0386(tokioAsyncFdI/O-safety unsoundness; failedcargo auditandcargo deny):tokio1.53.1 → 1.54.1. CronManager does not useAsyncFd.RUSTSEC-2026-0486(rustix xattr unsoundness, dev-only viatempfile):rustix1.1.4 → 1.1.6.RUSTSEC-2026-0459(libsqlite3-sysbundled SQLite CVE): ignored in.cargo/audit.tomlwith rationale + review date. The crate is only inCargo.lockbecausesqlxlists its optional sqlite backend; it is not in the build graph (cargo tree --target all -e all -i libsqlite3-sysis empty), and no fixedsqlx-sqliteexists (0.8.x and 0.9.0 pinlibsqlite3-sys< 0.38).
0.3.0-alpha - 2026-10-22
Minor bump — one feature with a potentially breaking default. 303 tests pass (was 289 on 0.2.4-alpha; +14 env_safety / loader / YAML-parse coverage).
Added
-
FLEET-STRONGHOLDS §11.3 — dev-fixture DSL gate (closes #54, via PR #55). CronManager adopts the cross-service pattern that refuses dev / mock / test / example DSL files in non-dev environments. New config field:
security.allow_dev_fixture_dsls: bool(defaultfalse, aliasallowDevFixtureDsls). Case-insensitive, POSIX-slash normalised substring match against every file path underdsl_path.Fixture patterns (intentionally narrow — the shipped
DSL/samples/tree walks clean):dev-login, mock-, -mock, /test/, example-, -example, /dev/, /mocks/Behaviour matrix:
APP_ENVallow_dev_fixture_dslsFile matches a pattern → dev / development / local any WARN, load continues not-dev true WARN, load continues (operator opt-in) not-dev false (default) Fatal error, boot refuses Gate is wired through both boot (
main.rs) and/reload(src/router.rs) so a mock DSL dropped at runtime is caught too. The pattern match bubbles a fatal error out of the walk — it is a security-posture violation, not an authoring bug, so it does NOT flow through the FN2 skip-and-warn path.
Changed
-
BREAKING (operator-visible, config-driven): operators whose
dsl_pathcontains files matching any fixture pattern will see those files refuse to load after upgrade under non-devAPP_ENV. Three resolution paths:- Rename the files out of the pattern list (recommended) —
mock-upstream.yaml→upstream-stub.yaml. - Opt out with
security.allow_dev_fixture_dsls: trueand accept the doctor WEAK + env_safety §11.2 posture WARN. - Set
APP_ENV=dev(also permits weak credentials — not recommended for staging/prod).
The gate does not touch deployments where no file matches a pattern. The shipped
DSL/samples/tree (hello-world,time-bounded,manual-trigger,post-webhook,backup,health-check,examples,manual-script) is pattern-clean —examples.yamlis distinct fromexample-which requires a trailing dash. - Rename the files out of the pattern list (recommended) —
-
env_safety::posture_checks_forrecognisesallow_dev_fixture_dsls=trueas unsafe-in-prod (same class asallow_dangerous_env_overrides=true,trust_network=true). UnderAPP_ENV=production, the opt-out trips the §11.2 posture WARN;cronmanager doctorlists it as WEAK with the full fixture-pattern list in the message.
0.2.4-alpha - 2026-10-15
One feature on top of 0.2.3-alpha. Not required by upgraders;
empty default = no behaviour change. 289 tests pass (was 275 on
0.2.3-alpha; +14 invariant / pentest / end-to-end coverage).
Added
-
security.allowed_private_hosts(closes #49, via PR #51 superseding #50) — per-hostname exception to the SSRF pre-flight. HTTP jobs whose URL host is listed may resolve to RFC 1918 / loopback / CGNAT / ULA addresses whileblock_private_networksstaystrue, so cluster-internal targets (e.g.http://ruuter-internal:8080,http://my-svc.ns.svc.cluster.local) work under a non-devAPP_ENV. Previously the only option wasblock_private_networks: false, whichenv_safetyrefuses outsidedev— the operator either lost every cluster-internal job or lost the posture gates.Exact, case-insensitive match (trailing dot folded); no wildcards, no suffix matching. Permitted entry characters are RFC 1035 hostname chars (ASCII letters/digits/hyphen/dot) plus underscore for k8s / DNS SRV compatibility. Entries that can never match a URL host (
*,*.svc.cluster.local,svc?x, IP literals, scheme/port/path markers, whitespace, control bytes) are ignored at normalisation with a doctor WEAK + boot WARN. Link-local and cloud metadata addresses (169.254.0.0/16,fe80::/10,fd00:ec2::254,::ffff:169.254.169.254), unspecified, multicast, and broadcast stay refused even for listed hosts.Config field accepts both snake_case (
allowed_private_hosts) and camelCase (allowedPrivateHosts) via#[serde(alias)];deny_unknown_fieldscatches typos likeallowed_private_host(singular).cronmanager doctorlists valid entries as INFO.
Changed
-
Boot WARN when
allowed_private_hostsis set alongsideblock_private_networks: false. The allowlist is inert in that combination because every private address is already permitted; the operator most likely wanted the allowlist instead of the kill switch, not alongside it. See PR #51. -
Error message on SSRF-refused HTTP job now points at
security.allowed_private_hostsinstead of suggestingblock_private_networks=false. CLAUDE.md troubleshooting updated to lead with the allowlist and demote the kill switch to a dev-only last resort.
0.2.3-alpha - 2026-10-14
One headline feature + two CI unblockers on top of 0.2.2-alpha.
Not required by upgraders; new field defaults preserve existing
behaviour. 266 tests pass (was 244 on 0.2.2-alpha; +22 header
coverage).
Added
-
HTTP jobs accept
headers:andheaderEnvs:(closes #39, via PR #46 superseding #40). Two optional YAML fields ontype: httpjobs:headers: X-Source: cronmanager headerEnvs: X-Internal-Service-Token: INTERNAL_SERVICE_TOKENheaderEnvsholds env-var NAMES (same convention assecurity.per_group_token_envs); values are resolved at fire time, never stored inJobKind, never logged, never persisted, and marked sensitive on the HTTP/2 wire viaHeaderValue::set_sensitive(true). Rotating the backing env needs no/reload.Load-time validation refuses: invalid header name, forbidden framing header (
host,content-length,transfer-encoding,connection,upgrade,te,trailer— case-insensitive), HTTP/2 pseudo-headers (:authority,:method,:path,:scheme,:status), same header set in both maps, malformed env-var name (empty, leading digit, non-alnum/_), literal value that isn't a valid header value, env var unset / empty / not a valid header value. Attacker-controlled CRLF-injection payloads in env values are refused at both load AND fire with anti-leak error strings. One file failing header validation is skipped with ERROR; sibling files load normally (per the per-file skip-and-warn rule).In-crate shape change:
JobKind::Httpgainsheaders: Vec<HttpHeader>;HttpExecutor::executetakes aheaders: &[HttpHeader]argument. No external semver impact — CronManager ships as a binary, not a library.
Changed
- Empty env values are now rejected at
headerEnvs:load (new loudness). An emptyAuthorization:or service-token header is a 100% config bug — some upstreams accept it as "no auth" and return 200. Fails loudly at load, not silently at fire. See PR #46.
Security
- CI unblocker — ignore RUSTSEC-2024-0449 (closes #41, via
PR #45).
unsafe-libyamlis unmaintained (upstream archived 2024-03-25). Pulled in transitively viaserde_yaml_ng; the advisory itself states "No safe upgrade is available". YAML is only read from operator-controlled files, never over the wire — exposure is nil. Mirrored in.cargo/audit.tomlanddeny.tomlwith 2027-01-31 review date.
Build
- CI unblocker — bump
async-trait0.1.91 → 0.1.92 (closes #43, via PR #45). Rust 1.99.0 stabilised a newclippy::double_must_uselint that fires inside the proc-macro expansion ofasync-trait 0.1.91. The 0.1.92 release resolves the lint in generated code (upstream #303). Patch bump viaCargo.lockonly;Cargo.tomlspecasync-trait = "0.1"already permits it.
0.2.2-alpha - 2026-09-18
h2ck.me v1 audit-cycle round — closes six findings surfaced in
h2ck.me/projects/CronManager-on-Rust/v1/NEXT-TASKS.md (2026-09-17).
Every fix / feature landed as its own one-issue-one-branch-one-PR
per the project's ops policy: PRs #20, #22, #24, #26, #28, #30.
239 tests pass (was 223 on 0.2.1-alpha; added +6 lock-order pin,
+3 405 pins, +1 axum shutdown wiring, +1 SIGTERM handler unit,
+3 offline-mode dispatch/env, +7 doctor findings + render); cargo fmt --check + cargo clippy --all-targets -- -D warnings +
cargo audit --deny warnings + cargo deny check all + mdbook build all clean.
Patch version bump. CronManager ships as a binary, not a library
— there are no external Rust API consumers — so the two additive
items with in-crate shape implications (new ExecutionStatus::Offline
variant, new ExecutorBundle.offline_mode: bool field) don't
warrant a minor bump on their own. Config / DSL / HTTP / CLI
surface stays fully backward-compatible with 0.2.1-alpha; every
new lever defaults to the pre-existing behaviour
(CRONMANAGER_OFFLINE unset = 100% behavioural parity).
Ships on dev only. main remains at 0.1.4-alpha.
Added
cronmanager doctorCLI subcommand — synchronous offline config audit. Loads the same config the boot path would, runs every checkmain.rsruns (env-safety, refuse-to-start, DSL path existence, database env, weak posture flags) and prints severity-prefixed findings (FATAL/BREAK/WEAK/INFO). Exits1on any FATAL. Never binds a listener, never touches the DB. Wire into containerHEALTHCHECKor pre-deploy CI. Adopts FLEET-STRONGHOLDS §8.2 (XTR-pattern). (h2ck.me v1 T-19, PR #30.)CRONMANAGER_OFFLINE=trueenv-var lever — short-circuits every HTTP + shell dispatch. One history row per fire recordsstatus=OFFLINE, no network call, no child process. Boot emits a WARN and doctor surfaces an INFO. Truthy values:true/1/yes/on(case-insensitive). NewExecutionStatus::Offlinevariant with labelOFFLINE— thejob_execution_history.statuscolumn isVARCHAR(50)so no migration is required. New publicExecutorBundle.offline_mode: boolfield. Adopts FLEET-STRONGHOLDS §9.1. (h2ck.me v1 U15, PR #28.)- Graceful shutdown on SIGTERM (unix) + SIGINT / Ctrl+C —
axum::serve(..).with_graceful_shutdown(shutdown_signal())drains in-flight requests when the container orchestrator sends SIGTERM (docker stop, k8s pod eviction). Before this change, in-flight requests were aborted mid-flight and their history rows lost. Newsrc/signal.rsmodule holds the future. Windows: only Ctrl+C is available; tokio's ctrl_c handler covers both platforms. Newlibcdev-dependency (SIGTERM-to-self regression pin). (h2ck.me v1 T-18 / FLEET §34.4, PR #26.)
Changed
tower_http::RequestBodyLimitLayer413 body is now structured JSON matching every other failure path in the codebase:{"error":"request_too_large","message":"...","limit":N}. Previously the layer emitted a bare-text body that JSON clients couldn't parse. Newstructured_error_body_middlewareinsrc/router.rs, wired outside the body-limit layer viafrom_fn_with_state. Handler-generated 413s (e.g.TooManyQueryParams) that already carryapplication/jsonpass through untouched. (h2ck.me v1 T-15 / FLEET-STRONGHOLDS §U10, PR #22.)
Fixed
Scheduler::describe_runninglock-order inversion risk — the method used to acquirerunningthenjobsand hold both simultaneously, while every other acquisition site (stop,trigger_now,reload_from) takes at most one at a time. Any future caller goingjobs→runningcould have deadlocked.describe_runningnow snapshotsrunningunder its own lock (cloning JobKey + started_at_ms + schedule), releases it, then takesjobsfor the per-keylast_resultlookup. No method insrc/scheduler.rsholds both simultaneously anymore. Regression pin (describe_running_and_reload_do_not_deadlock) hammersdescribe_running+reload_from+stopconcurrently for 500 ms with a 10 s timeout guard. (h2ck.me v1 T-5 / 2026-09-17 concurrency mini-audit R-4, PR #20.)- mdbook-linkcheck failure on CHANGELOG version headings —
the linkcheck flagged
## [0.2.1-alpha]/## [0.2.0-alpha]as "potential incomplete link" (pre-existing failure ondev). Add explicit link definitions at the bottom of CHANGELOG.md — the Keep-a-Changelog idiom — so linkcheck resolves them.
Tests
- 405 Method Not Allowed regression pins — axum's
MethodRouteralready emits 405 with the correctAllow:header when the path matches but the method doesn't, but no regression tests locked the behaviour. Newwrong_method_on_health_returns_405_with_allow_header,wrong_method_on_execute_returns_405, andunknown_path_still_returns_404guard against a futureRouter::fallbackrefactor silently downgrading to 404 or vice versa. (h2ck.me v1 T-17 / RFC 7231 §7.4.1, PR #24.)
0.2.1-alpha - 2026-09-14
Security-patch republish of 0.2.0-alpha. Application code is
byte-identical to 0.2.0-alpha; the only source change is the
Dockerfile runtime layer, which now runs apt-get -y upgrade
before installing runtime dependencies. This absorbs Debian
security-channel patches on top of the pinned debian:13.6-slim
base.
Why
Trivy on the 0.2.0-alpha publish flagged 12 upstream-fixed
CVEs (9 HIGH + 3 CRITICAL) in the runtime layer — gzip,
libpcre2-8-0, libsqlite3-0, and perl-base. The pinned
base image tag froze at v0.1.4-alpha release time, so any CVE
patched in Debian's security channel since then wasn't reaching
the built image. The Trivy failure blocked cosign signing —
v0.2.0-alpha images landed on both registries but are UNSIGNED
and carry the 12 CVEs.
Yank notice
v0.2.0-alpha is yanked. The git tag stays in place as
historical record; the GH Release carries a yanked notice
pointing at v0.2.1-alpha. Registry artefacts for
v0.2.0-alpha remain (immutable-tag discipline) but SHOULD NOT
be pulled — they are unsigned AND carry the 12 known CVEs.
Changed
Dockerfileruntime layer now runsapt-get update && apt-get -y upgradebefore installing runtime deps. Every build picks up the latest security-channel patches without moving off the pinned base tag. No layer-caching regression — buildx cache-from GHA still hits when only source (not the Dockerfile) changes.Cargo.toml,Cargo.lock,VERSION,docker-compose.yml,README.md,book/src/introduction.md— version bumped0.2.0-alpha→0.2.1-alpha(atomic per DEV-REQUIREMENTS §8).
No functional change
223 tests pass (identical to 0.2.0-alpha). cargo fmt --check
cargo clippy --all-targets -- -D warnings+cargo auditcargo deny check all+( cd book && mdbook build )all clean. No Rust source touched — every symbol / API / config field / DSL shape from0.2.0-alphacarries forward unchanged.
0.2.0-alpha - 2026-09-13
h2ck.me v2 audit round + Buerostack fleet-strongholds adoption.
Closes every break-test finding surfaced after 0.1.4-alpha
merged (FN1, FN2, FN3, FN5, FN9, FN-LOG-1..4, F-CM-1, F-CM-4),
the F-CM-2 per-group-token feature request, the FN7/FN8 DSL
list-form request, and all four PR-review v2 backlog nits. Also
adopts four cross-service FLEET-STRONGHOLDS.md patterns (§1.6
W3C traceparent propagation, §5.1 default security response
headers, §11.1 credential-safety gate, §11.2 posture-safety
gate).
223 tests pass (was 156); cargo audit clean; cargo deny check all clean; cargo clippy --all-targets -- -D warnings clean;
mdbook build + linkcheck clean. Minor version bump because
JobKind::Exec changes shape (command: String →
argv: Vec<String>) — any downstream consumer constructing a
JobSpec directly must update the fixture. Config / DSL / HTTP
surface stays backward-compatible: every new field defaults to
the pre-existing behaviour.
Ships on dev only. main remains at 0.1.4-alpha until the
project reaches prod-ready state.
Added
/healthzpublic alias for/health— KuberneteslivenessProbedefault binds cleanly without a token. (h2ck.me FN1 / F-CM-4.)security.expose_jobs_publicly/security.expose_running_publicly— optional gate on/jobs*and/running*recon endpoints. Defaulttruefor backward compat; boot WARN when lefttruewith a token configured. (h2ck.me FN3 / F-CM-1.)security.per_group_token_envs: BTreeMap<String, String>— optional scoped tokens per group. When populated,/execute/:g/:j,/stop/:g/:j,/reload/:gaccept EITHER the master admin token OR the group-specific token. Values are env-var names — no raw tokens in the config file. Missing envs WARN at boot and the group falls back to master-only. (h2ck.me F-CM-2.)- DSL
command:accepts YAML list form — explicit-argv passthrough for shell jobs that needsh -c "…"semantics. String form (JVM parity: whitespace-tokenised) remains supported. (h2ck.me FN7 + FN8.) env_safetymodule — readsAPP_ENV/ENVIRONMENT/DEPLOY_ENV(first match wins, unknown values fail-safe toProduction) and REFUSES to boot in non-devwhen weak credentials or unsafe posture flags are present. Weak-pattern list coverschangeit,password,01234,dev-,-test,example,test-admin-token, plus min-length checks (32 for tokens, 12 for passwords). Indevthe same conditions produce WARN and boot continues. (FLEET-STRONGHOLDS §11.1 + §11.2.)- Default security response headers — Content-Security-Policy, Strict-Transport-Security, X-Frame-Options DENY, X-Content-Type-Options nosniff, Referrer-Policy no-referrer on every response, including error paths. (FLEET §5.1.)
- W3C Trace Context response headers —
traceparent+x-trace-idon every response. Inboundtraceparentis inherited when well-formed (version=00, 32-hex trace-id ≠ all-zeros); fresh 32-hex uuid otherwise. (FLEET §1.6.) - Per-request access log — one INFO line per completed
request:
http_request_completed method=X route=Y status=Z duration_us=… trace_id=…. Matched route pattern only (never raw URI), never headers/bodies, never client IP. SOC 2 CC7.2 / ISO 27001 A.12.4 compliance. (h2ck.me FN-LOG-3.) - Auth-fail WARN with client_ip_hash + route + reason — every admin-gate reject emits a structured line with a PII-safe SHA-256 short-hash of the client IP, the matched route pattern, and a distinguishable reason (missing header vs wrong token). Enables blocklist derivation from logs without exposing raw IPs. (h2ck.me FN-LOG-2.)
tower_http::TimeoutLayerwraps the whole request/body- read/handler/response-write againstlimits.request_timeout_secs. Kills slow-drip and slow-loris style requests that used to bypass the executor-level timeout. (h2ck.me FN5.)sha2direct dep +security::short_client_hash— PII-safe short-hash helper.tower-httpgains thetimeoutfeature.
Changed
- ⚠️
JobKind::Exec.command: String→argv: Vec<String>— shape change to the executor API. Loader normalises both DSL forms (string / list) to argv before the executor sees them. Any Rust fixture constructing aJobSpecdirectly must update the field.JobKind::exec_command_display()returns the argv space-joined for logs / display. (h2ck.me FN7 + FN8.) - DSL loader skips-and-warns on per-file errors — one bad
file no longer aborts the whole boot /
/reload. Bad files log at ERROR (naming source path + reason); sibling good files register. If EVERY file fails, boot succeeds with 0 jobs plus a distinguishable WARN. Onlyread_dirfailures remain fatal. (h2ck.me FN2.) PostgresRecordersanitisesresponse_bodyBEFORE persist — newsecurity::sanitize_for_persistenceruns first, thentruncate_response_bodyapplies the 64 KiB head+tail cap. Downstream DB-row viewers see escaped CR/LF/ANSI; raw bytes no longer land in the row. (h2ck.me PR-review v1 nit #3.)ReloadGatememory bounded — opportunistic stale eviction (entries older than10 × min_interval_secs) plus hard cap at 1024 distinct groups on the write path. Behavioural no-op for deployments with < 1024 groups. (h2ck.me PR-review v1 nit #1.)- Log stream is plain-text under Docker / systemd —
tracing_subscriber::fmt()only emits ANSI colour codes when stderr is a TTY. SIEM parsers see clean bytes. (h2ck.me FN-LOG-1.) admin_gateextracts group from URL path and checks both master AND group-specific tokens in parallel viasubtle::ConstantTimeEqso a caller can't time which token was consulted. (F-CM-2.)docker-compose.yml:read_only: trueon the cronmanager service — rootfs is immutable;/tmpstays writable viatmpfs(64 MiB). Any shell job needing persistent scratch points at a bind-mounted volume added by the operator. (h2ck.me FN9.) Image tag bumped from the stale0.1.0-alpha.1to track the crate version.main.rsusesinto_make_service_with_connect_info::<SocketAddr>soadmin_gatereceives the peer address for the auth-fail log line.
Tests / hardening (in commits, not surfaced to end users)
- 14 new
env_safety::testsunit tests (env classification, weak-value detection, enforce_* behaviour). - 5 new
traceparent::testsunit tests. - 7 new integration tests for the F-CM-2 per-group-token accept / reject matrix.
- 5 new integration tests for FN3 recon-endpoint gating.
- 4 new loader tests for the two DSL command forms.
- 2 new shell-executor tests for the argv shape.
- Regression pin
trust_network_true_with_token_set_still_enforces_gate(h2ck.me PR-review nit #4) locks in the invariant thatadmin.trust_network=truenever silently disables the runtime token check. - Regression pin
slow_body_upload_hits_request_deadlinedrives a raw TCP socket to verify the FN5 fix. - Regression pin
every_response_carries_security_headerswalks four routes and validates all five FLEET §5.1 headers. - Regression pins
every_response_carries_traceparent_headers+traceparent_inherits_inbound_trace_id.
Documentation
CLAUDE.md: new "Breaking / non-obvious changes in0.2.0-alpha" section with 15 numbered items covering every code / config / DSL surface change; expanded boot-log triage tables; two-formcommand:guide; Rust-fixture update pattern; hard rule that version bumps / tags / GitHub Releases require explicit maintainer approval regardless of invocation mode. Records thatmainis intentionally frozen at0.1.4-alphauntil prod-ready.book/src/configuration.md: field reference gains the three new SecurityConfig knobs; new "Per-group admin tokens" and "Environment-aware boot safety gates" subsections; two-formcommand:documentation with worked "why the string form breaks for shell quoting" example; REST-API table gains an Auth column and the/healthzalias; new "Every response carries" / "Access logging" / "Log stream is plain-text under Docker / systemd" subsections.book/src/failure-modes.md: status table gains 401 / 403 / 408 / 413 too_many_query_params / 429 too_many_requests; common causes gains skip-and-warn / env-safety / slow-body triage.
0.1.4-alpha - 2026-09-06
Security hardening pass in response to the h2ck.me pre-publication
audit (../h2ck.me/projects/CronManager-on-Rust/v1/AUDIT.md). All
findings addressed and validated by h2ck.me
(v1/PR-REVIEWS/3-89bce00.md — ✅ approve). 156 tests pass
(was 90); cargo audit clean; cargo deny check clean;
cargo clippy --all-targets -- -D warnings clean; mdbook build
- linkcheck clean. Also bundles the Snyk-flagged runtime base
image bump
debian:bookworm-slim→debian:13.6-slim(PR #2).
Version jump 0.1.0-alpha.3 → 0.1.4-alpha is intentional
(alignment with the fleet's shared version counter); no
intermediate alpha tags exist.
Added
adminconfig block — bearer-token gate onPOST /execute,POST /stop,POST /reload. Token comes from the env var named byadmin.bearer_token_env(defaultCRONMANAGER_ADMIN_TOKEN). Constant-time comparison viasubtle::ConstantTimeEq. Case-insensitive scheme name per RFC 6750. Read-only endpoints (/health,/jobs,/running,/actuator/*) stay open.admin.trust_network=truedisables the boot-time refusal to start on non-loopback binds without a token. (Finding C1.)securityconfig block — every hardening cap is operator-tunable, and every cap emits a WARN at boot if loosened from the default. Fields:block_private_networks,allow_dangerous_env_overrides,max_query_params,max_dsl_file_bytes,dsl_load_timeout_secs,max_retry_count,min_cron_interval_secs,stored_response_body_max_bytes,reload_min_interval_secs.- Bounded query-string extractor —
POST /execute/…refuses requests with more thansecurity.max_query_paramspairs (default 64). Structured413naming the count + cap. (Finding C2.) - SSRF pre-flight — HTTP job URLs are refused at load if the host is a literal private / loopback / link-local / ULA IP (IPv4, IPv6, and IPv4-mapped IPv6). At fire time, hostnames are DNS-resolved and refused if any returned address is non-routable. Reqwest redirects are DISABLED so a legit upstream can't 302 the executor into a metadata endpoint. (Finding H1.)
- Log-injection sanitiser — captured shell stderr / non-2xx
HTTP response bodies are stripped of CR/LF/ANSI/control bytes
before landing in error strings that get logged. Cap at 4 KiB
per log stanza. DB rows retain a larger head+tail slice via
truncate_response_body. (Finding H2.) - Dangerous-env blacklist —
/executerefuses env overrides forPATH,LD_*,DYLD_*,PYTHONPATH,NODE_OPTIONS,RUBYOPT,PERL5OPT,JAVA_TOOL_OPTIONS, and the loader-hook families. Case-insensitive. Response is403 forbiddennaming the offending key. (Finding H3.) /reloadper-group throttle — second reload withinsecurity.reload_min_interval_secsfor the same group returns429 too_many_requestswithretry_after_secs. (Finding H4.)- DSL file-size cap + load wall-clock timeout — per-file YAML
refused at load if bigger than
security.max_dsl_file_bytes(default 1 MiB). Full walk wrapped in atokio::time::timeoutunderspawn_blocking, default 15s. (Finding M1.) - retryCount cap — DSL with
retryCount > security.max_retry_countrejected at load. WARN above 5. (Finding M2.) - High-frequency cron WARN — jobs whose next two fires are
less than
security.min_cron_interval_secsapart emit a WARN at load naming the job + interval. (Finding M3.) - Override audit log — INFO log per
/executecall lists the applied override KEYS (never values). (Finding M4.) - History row body truncation —
response_bodycapped atsecurity.stored_response_body_max_bytes(default 64 KiB) per row via head+tail slice with an inline marker. New migration adds a compound(job_group, job_name, execution_time DESC)index. (Finding M5.)
Fixed
- Reqwest client no longer follows redirects (was up to 10 by default). See the SSRF pre-flight addition.
- HTTP upstream error bodies were logged verbatim including attacker-controlled CRLF / ANSI. Now sanitised.
Migration
Existing operators on loopback / private-network deployments need no changes — the gate short-circuits when no token is configured and every new default is safe. Public / internet-exposed deployments now MUST either:
- Set
CRONMANAGER_ADMIN_TOKENand passAuthorization: Bearer <token>on every state-changing call, or - Set
admin.trust_network=trueif a reverse proxy / service mesh authenticates every request before it reaches the process.
Otherwise the process refuses to start with an explanatory error.
0.1.0-alpha.3 - 2026-08-05
CI housekeeping. No product changes — same binary behaviour, same image contents, same 90-test suite (0 failures).
Changed
- Bumped all workflow actions to Node-24-native majors, silencing
the "Node.js 20 is deprecated" annotation surfaced on the
alpha.2 publish run:
actions/checkoutv4 → v5actions/cachev4 → v6actions/upload-pages-artifactv3 → v5actions/deploy-pagesv4 → v5docker/build-push-actionv6 → v7docker/login-actionv3 → v4docker/setup-buildx-actionv3 → v4docker/setup-qemu-actionv3 → v4
0.1.0-alpha.2 - 2026-08-05
JVM-compatibility hardening pass. No breaking changes for existing
CronManager-on-Rust users. Every JVM sample DSL still loads
unchanged; the JVM application.yml shape now fails loudly with a
diagnostic that shows the fix.
Added
- JVM
application.ymlcompat aliases — the four JVM camelCase field names (configPath,appRootPath,allowedOrigins,shellEnvironment) bind to their Rust snake_case counterparts via#[serde(alias)]. - String-form
allowed_origins— the JVM comma-separated string form is accepted in addition to the YAML list form. - JVM Spring wrapper rejection — pasting a JVM
application.ymlverbatim (top-levelapplication:/spring:/management:/logging:) is caught at boot with a diagnostic that names the wrapper and shows the inline fix. - Actuator alias endpoints —
GET /actuator/health(aliased to/health) andGET /actuator/info. - Trailing-slash routes —
GET /jobs/andGET /running/now work in addition to the no-slash form, matching JVM Spring's auto-normalisation. - Inbound request body cap wired —
limits.max_request_bytesis now enforced viatower_http::limit::RequestBodyLimitLayer. Bodies over the cap return413 request_too_large. (The field was previously parsed but unused.) - Boot-time diagnostic pass — one INFO summary of every config
field at startup, plus WARNs for likely-footgun values
(
allowed_originscontaining"*", disabled timeouts). - Log-line grep parity with JVM — per-DSL-file INFO on load, per-group INFO summary, per-job scheduler INFO, per-attempt DEBUG, per-retry WARN, success-after-retry INFO, all-attempts-failed ERROR, ignore-failures WARN.
- mdBook: samples cookbook + JVM porting quickref — two new book pages covering every feature and every JVM field rename.
- JVM sample corpus in CI — the upstream JVM
DSL/samples/**fixtures mirrored verbatim undercompat/dsl/and parsed on every build.
Changed — silent-drop hardening
#[serde(deny_unknown_fields)]on every config and DSL struct (AppConfig,Limits,DatabaseCfg, DSL job). A typo likedslpath:orretryCoun: 3is a hard load error, not a silent no-op.- HTTP method whitelist enforced at load
(
GET/POST/PUT/DELETE/PATCH/HEAD/OPTIONSonly). trigger: trueexplicitly rejected.
Fixed
InvalidConfigerror variant replaces generic 500s when the config file structurally can't load. Returns400 invalid_config.
Tests
- +7 tests in
tests/compat_parse.rs(JVM sample corpus). - +10 tests in
tests/deny_unknown.rs(silent-drop regressions). - +5 tests in
tests/router_integration.rs(actuator aliases, trailing-slash routes,413on oversized body). - +11 unit tests in
src/config.rs.
Total suite: 90 tests, 0 failures.
0.1.0-alpha.1 - 2026-07-31
Initial alpha. Rust reimplementation of the Spring Boot / Quartz
CronManager scaffolded
per the Buerostack DEV-REQUIREMENTS.md ruleset.
Added
- Scheduler — Quartz-style cron expression firing per job,
built on
cron::Schedule+ per-job Tokio tasks. Supports the?day-of-month / day-of-week wildcards used by the JVM ancestor. - HTTP job executor — GET/POST/PUT/DELETE/PATCH via
reqwestwith configurable timeout, retry-with-delay, andignoreFailuressemantics faithful to the JVM implementation. - Shell job executor — spawns via
tokio::process::Commandwith an opt-inallowedEnvswhitelist and ashell_timeout_secswall-clock cap that SIGKILLs runaway processes. - YAML DSL loader — walks
dsl_pathrecursively; group names are derived from the relative path (DSL/samples/http/x.yaml→samples-http-x), matching JVM behaviour. Manual-only jobs supported viatrigger: off(ortrigger: false). - Time-window jobs —
startDate/endDate(Unix millis) silently skip fires outside the window. History records the skip asSKIPPED. - REST API —
/health,/,/jobs,/jobs/{group},/running,/running/{group},POST /execute/{group}/{job},POST /stop/{group}/{job},POST /reload/{group}. Structured JSON error bodies on every failure path. - Body size caps + timeouts —
limits.max_request_bytes,limits.max_response_bytes,limits.request_timeout_secs,limits.shell_timeout_secsper DEV-REQUIREMENTS §5.3. - CORS —
tower_http::cors::CorsLayergated onallowed_origins. Empty list disables CORS entirely. - Execution history — optional TimescaleDB persistence via
sqlx. Schema mirrors the JVM Liquibase changelog: hypertable onexecution_time, retention policy (90 days), hourly + daily continuous aggregates. - Container image — multi-stage
rust:1.88-slim→debian:bookworm-slim, non-root uid 1000, tini PID 1,HEALTHCHECKhitting/health. - Hardened compose file —
cap_drop: ALL,no-new-privileges:true,tmpfs: /tmp, cpu/memory limits. - CI — four workflows:
tests.yml(fmt + clippy + build + test on amd64 + arm64, docs-build with linkcheck),security.yml(cargo audit+cargo denydaily),publish.yml(multi-arch build, Trivy scan, per-arch smoke test, cosign keyless signing),docs.yml(mdBook → GitHub Pages). - Docs — mdBook with introduction, getting-started, configuration, failure-modes, changelog. Everything runnable as-shown.
Structural
- Full Buerostack Rust project layout per
../DEV-REQUIREMENTS.md:HANDOFF.md,SECURITY.md,STANDARDS.md,NOTICE,VERSION,deny.toml,.cargo/audit.toml,book/,tasks/.