node-cron
Version:
A Lightweight Task Scheduler for Node.js
14 lines (13 loc) • 701 B
TypeScript
import { ScheduledTask, TaskFn, TaskOptions } from "./tasks/scheduled-task";
export declare function schedule(expression: string, func: TaskFn | string, options?: TaskOptions): ScheduledTask;
export declare function createTask(expression: string, func: TaskFn | string, options?: TaskOptions): ScheduledTask;
export declare function validate(expression: string): boolean;
export { ScheduledTask } from './tasks/scheduled-task';
export type { TaskFn, TaskContext, TaskOptions } from './tasks/scheduled-task';
export interface NodeCron {
schedule: typeof schedule;
createTask: typeof createTask;
validate: typeof validate;
}
export declare const nodeCron: NodeCron;
export default nodeCron;