Repository navigation
Commit 21c5dcb
fix(spec): replace the croner-refused cron example in the DisasterRecoveryPlan docblock (#16415)
* fix(spec): replace the croner-refused cron example in the DisasterRecoveryPlan docblock
The `DisasterRecoveryPlanSchema` `@example` spelled its six-hourly backup
schedule `'0 0/6 * * *'`. `0/6` is Quartz-style stepping, and `croner` — the
only cron parser the platform runs, reached via `CronJobAdapter` -> `new Cron()`
— refuses it:
TypeError: CronPattern: Syntax error, stepping with numeric prefix ('0/6')
is not allowed. Use wildcard (*/step) or range (min-max/step) instead.
Measured against the croner 10.0.1 copy installed for
`@objectstack/service-job`, with the sibling example `'0 2 * * *'` as the
positive control (accepted). The replacement `'0 */6 * * *'` is accepted and
fires at the same instants; it is the spelling this schema's own tests already
use.
Comment-only: no schema, no export, no accept-set movement. The docblock does
publish into the shipped `dist/system/index.d.ts`, so the change is
user-visible and carries a changeset.
Claude-Session: https://claude.ai/code/session_01T6HeZvT9wdSJD1ZxJb5Eno
Co-authored-by: Claude <noreply@anthropic.com>
* fix(spec): use the enumerated six-hourly spelling — the wildcard step closes the docblock
The wildcard-step form croner's own error message suggests cannot be written
inside a `/** ... */` block comment: the step separator is the comment
terminator, so the file stops parsing. Measured — esbuild refused
disaster-recovery.zod.ts at the example's own line, column 26, during
`pnpm --filter @objectstack/spec build`.
The enumerated equivalent carries no such sequence, is accepted by the same
croner 10.0.1 copy, and was measured to fire at the identical instants
(00:00, 06:00, 12:00, 18:00).
Claude-Session: https://claude.ai/code/session_01T6HeZvT9wdSJD1ZxJb5Eno
Co-authored-by: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 9f890d3 commit 21c5dcb
2 files changed
Lines changed: 20 additions & 1 deletion
File tree
- .changeset
- packages/spec/src/system
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
201 | 201 | | |
202 | 202 | | |
203 | 203 | | |
204 | | - | |
| 204 | + | |
205 | 205 | | |
206 | 206 | | |
207 | 207 | | |
| |||
0 commit comments