Skip to content

basalt / scheduler/src / ScheduleDefinitionError

Class: ScheduleDefinitionError ​

Defined in: scheduler/src/index.ts:30

A schedule entry was defined inconsistently. Thrown while the define callback builds the entry, so the app fails at boot instead of running a task on the wrong cadence.

  • SCHEDULE_CONFLICT: two frequencies on one entry (.daily().monthly()), .at() with a frequency it can't refine (or called twice), or a day-of-week modifier combined with .cron().
  • SCHEDULE_INVALID_TIME: .at() received something other than HH:mm.
  • SCHEDULE_INVALID_INTERVAL: a reconciler's every can't be expressed on the minute-based cron (e.g. '30s', '7m', '90m').

Extends ​

Constructors ​

Constructor ​

> new ScheduleDefinitionError(code, message): ScheduleDefinitionError

Defined in: scheduler/src/index.ts:31

Parameters ​

code ​

"SCHEDULE_CONFLICT" | "SCHEDULE_INVALID_TIME" | "SCHEDULE_INVALID_INTERVAL"

message ​

string

Returns ​

ScheduleDefinitionError

Overrides ​

BasaltError.constructor

Properties ​

code ​

> readonly code: string

Defined in: core/src/errors.ts:25

Inherited from ​

BasaltError.code


details? ​

> readonly optional details?: Record<string, unknown>

Defined in: core/src/errors.ts:28

Structured payload passed to the constructor, exactly as given (never sanitised here).

Inherited from ​

BasaltError.details

Released under the MIT License.