function SchedulerPlugin
Since 0.1.0
SchedulerPlugin(options?: SchedulerPluginOptions): IPlugin

Creates a scheduler plugin.

Examples

Example 1

app.register(SchedulerPlugin());

// Or with distributed locking via Redis
app.register(SchedulerPlugin({
  distributedLock: { enabled: true, storage: 'redis', url: 'redis://localhost:6379' },
}));

Parameters

optional
options: SchedulerPluginOptions

Plugin configuration

Return Type

IPlugin

A plugin that registers an IScheduler under 'scheduler'

Usage

import { SchedulerPlugin } from "scheduler-plugin/src/index.ts";