@types/node-cron
    TypeScript icon, indicating that this package has built-in type declarations

    3.0.6 • Public • Published

    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.

    index.d.ts

    // Type definitions for node-cron 3.0
    // Project: https://github.com/node-cron/node-cron, https://github.com/merencia/node-cron
    // Definitions by: morsic <https://github.com/maximelkin>,
    //                 burtek <https://github.com/burtek>,
    //                 Richard Honor <https://github.com/RMHonor>
    //                 Ata Berk YILMAZ <https://github.com/ataberkylmz>
    //                 Alex Seidmann <https://github.com/aseidma>
    // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
    import { EventEmitter } from 'events';
    
    export function schedule(cronExpression: string, func: ((now: Date | "manual") => 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 {
        /**
         * A boolean to set if the created task is scheduled.
         *
         * Defaults to `true`
         */
        scheduled?: boolean | undefined;
        /**
         * The timezone that is used for job scheduling
         */
        timezone?: string;
        /**
         * Specifies whether to recover missed executions instead of skipping them.
         *
         * Defaults to `false`
         */
        recoverMissedExecutions?: boolean;
        /**
         * The schedule name
         */
        name?: string;
    }

    Additional Details

    • Last updated: Mon, 14 Nov 2022 19:02:54 GMT
    • Dependencies: none
    • Global values: none

    Credits

    These definitions were written by morsic, burtek, Richard Honor, Ata Berk YILMAZ, and Alex Seidmann.

    Keywords

    none

    Install

    npm i @types/node-cron

    DownloadsWeekly Downloads

    149,636

    Version

    3.0.6

    License

    MIT

    Unpacked Size

    6.19 kB

    Total Files

    5

    Last publish

    Collaborators

    • types