class LocalScheduleJobRunner
A Scheduled Job Runner that uses node-cron, setTimeout and runs as a single node.
Persists and loads schedules on process stop/ start in the datastore with the types lock-manager-timer
and lock-manager-cron
Methods
addScheduledTask(component, name, id, config, data)
Name | Type | Description |
---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Returns |
|
Signature
addScheduledTask(component: string, name: string, id: string, config: {
isCron: true;
crontab: string;
} | {
isCron: false;
timeout: number;
}, data: any): Promise<void>;
addScheduleTaskListener(component, exec)
Name | Type | Description |
---|---|---|
|
|
|
|
|
|
Returns |
|
Signature
addScheduleTaskListener(component: string, exec: (name: string, id: string, data: any) => Promise<void>): Promise<void>;
hasSchedule(component, name, id)
Name | Type | Description |
---|---|---|
|
|
|
|
|
|
|
|
|
Returns |
|
Signature
hasSchedule(component: string, name: string, id: string): Promise<boolean>;