Installation
npm install --save @types/node-cron
Summary
This package contains type definitions for node-cron (https://github.com/node-cron/node-cron).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node-cron.
import { EventEmitter } from "events";
export function schedule(
cronExpression: string,
func: ((now: Date | "manual" | "init") => void) | string,
options?: ScheduleOptions,
): ScheduledTask;
export function validate(cronExpression: string): boolean;
export function getTasks(): Map<string, ScheduledTask>;
export interface ScheduledTask extends EventEmitter {
now: (now?: Date) => void;
start: () => void;
stop: () => void;
}
export interface ScheduleOptions {
scheduled?: boolean | undefined;
timezone?: string;
recoverMissedExecutions?: boolean;
name?: string;
runOnInit?: boolean;
}
Additional Details
- Last updated: Tue, 07 Nov 2023 20:08:00 GMT
- Dependencies: none
Credits
These definitions were written by morsic, burtek, Richard Honor, Ata Berk YILMAZ, Alex Seidmann, and Pedro Américo.