-
The Day of Month (DOM) and Day of Week (DOW) fields are now AND'd together. When both fields are restricted, a job fires only when both match — consistent with how every other cron field behaves. Previously both fields were OR'd when neither was
*.Existing schedules that restrict both fields will fire less often than they did in v2.0.0. For example,
0 0 13 * FRIpreviously fired on the 13th of every month and on every Friday; it now fires only on a Friday the 13th. Review any schedule that sets both DOM and DOW to a value other than*.The new semantics make previously impossible patterns expressible:
expression meaning 0 0 25-31 * FRIlast Friday of the month 0 0 1-7 * MONfirst Monday of the month Behaviour when either field is
*is unchanged — the restricted field governs. -
WORKER_NUMhas been renamed toSCHEDULER_WORKERS. Deployments setting the old variable will silently fall back to the default worker count. -
The cron engine changed from
robfig/cronv3.0.1 tonetresearch/go-cron. -
Release assets are now per-platform tarballs rather than a single Linux binary. v2.0.0 shipped
ocf-scheduler-2.0.0-linux-amd64; v2.0.1 ships four archives, each containingscheduler,tzlist, and their.sha1/.sha256files.
- Fixed
Scanfailures caused bySELECT *column ordering. Adding the log rate field changed column order and broke row scanning; all queries now use named columns so new fields cannot reorder existing ones. - Corrected the database migration filename.
- Renamed
postgres/scheudle_service.gotoschedule_service.go. - Cleared
go vetdiagnostics across the tree. - Fixed the
release-workdir-oflag to target a directory.
- Upgraded from the community
go-cfclientv2 to the officialcloudfoundry/go-cfclient/v3(v3.0.0-alpha.20). - Removed the legacy
/v2/infoendpoint from the mock CF API server.
The OCF Scheduler ranges now support cyclic ranges for the minutes, hours, days of the week, and months fields. A cyclic range means the start value can be larger than the ending value. This allows cron expressions to be more expressive instead of creating multiple ranges. It also makes fields with named values work without needing to know the actual values.
Examples
| expression | field | description |
|---|---|---|
| 57-3 | minutes | 57, 58, 59, 0, 1, 2, 3 |
| 23-1 | hours | 23, 0, 1 (spans midnight) |
| FRI-MON | DOW | FRI, SAT, SUN, MON (spans the weekend) |
| DEC-FEB | month | DEC, JAN, FEB (spans year boundary) |
| 26-3 | DOM | Wraps correctly for every month |
Cyclic ranges also work in step expressions
| expression | field | description |
|---|---|---|
| 20-2/2 | hours | every 2 hours from 8 pm(20) to 2 am |
A schedule may declare its own timezone by prefixing the cron expression with TZ= or
CRON_TZ=:
CRON_TZ=America/New_York 0 30 9 * * MON-FRI
TZ="Europe/Berlin" 0 0 3 * * *
The expression is evaluated in the declared zone, and the resulting fire time is then converted to the scheduler's own timezone. An expression with no prefix is evaluated directly in the scheduler's timezone.
The prefix itself is not new, but two things around it are:
- Matching single or double quotes around the zone name are now accepted —
TZ="Europe/Berlin"andTZ='UTC'both work. Previously the quotes were passed through to the zone lookup and the schedule was rejected. - An unknown zone is rejected when the schedule is created rather than failing later.
The zones the scheduler recognises can now be listed through the new authenticated
GET /scheduler-time-zones endpoint. The server's own zone is flagged in that listing and
reported in the startup log.
- Added a log rate parameter.
- Reworked scheduler worker handling; the worker count is now set by
SCHEDULER_WORKERS. - Added a timezone listing route.
LOG_LEVELnow accepts bothwarnandwarning, and its processing is explicit and case-insensitive.- Database migrations are now written to the log file, with a clearer migration message.
- Job name is included in application log messages.
- Switched to
log/slog, replacedioutilwithos, and moved tofilepathbuilders.
- Added unit tests across the presenter, core, logger, and cf packages.
- Raised
tzposixcoverage from 79.5% to 96.9%. - Added
cmd/schedulercoverage forErrorString,createBuildMeta, andcreateSemVer.
- Builds now produce artifacts for linux/amd64, linux/arm64, darwin/amd64, and darwin/arm64.
- Release binaries are produced by re-linking the objects compiled during the build rather than recompiling, so the released binaries are provably the same code as the tested release candidate — only the version stamp differs.
- SHA-1 and SHA-256 checksums are published alongside every binary.
| Release | Version | Release Date | Type | Changed |
|---|---|---|---|---|
| Go | 1.26.0 | toolchain | [X](## was 1.24) | |
| go-cron | v0.14.0 | source | [X](## was robfig/cron v3.0.1) | |
| go-cfclient | v3.0.0-alpha.20 | source | [X](## was community go-cfclient v2) |