Type Alias: ScheduleEntrypointOptions
ScheduleEntrypointOptions =
object
The options of scheduleEntrypoint.
Properties
middlewares?
optionalmiddlewares?:MiddlewareDefinition[]
The middlewares of this adapter's runs, run after the entrypoint's global middlewares.
name?
optionalname?:string
The adapter name, to tell apart several schedule adapters of one entrypoint.
onError?
optionalonError?: (error,action,context) =>void|Promise<void>
Called when a run fails (the action, a middleware or the access control threw), with the error, the action and the run's context. A failed run does not stop the next ones.
Parameters
error
unknown
action
context
Returns
void | Promise<void>
Default
the error is written to the application's log component (console.error without one)
onSkip?
optionalonSkip?: (action,scheduledAt,reason) =>void
Called when a run is skipped, with the action, the time the run was due and why: 'overlap' when the action's previous run is still in progress (an action without overlap: true), 'exclusive' when another instance of the application holds the run's lock (an exclusive action). An error it throws is written to the application's log component; the schedule goes on.
Parameters
action
scheduledAt
Date
reason
"overlap" | "exclusive"
Returns
void