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

    2.0.4 • 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 2.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>
    // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
    
    import { Timezone } from 'tz-offset';
    
    export function schedule(cronExpression: string, func: () => void, options?: ScheduleOptions): ScheduledTask;
    
    export function validate(cronExpression: string): boolean;
    
    export interface ScheduledTask {
        start: () => this;
        stop: () => this;
        destroy: () => void;
        getStatus: () => string;
    }
    
    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?: Timezone | undefined;
    }

    Additional Details

    • Last updated: Wed, 07 Jul 2021 00:01:47 GMT
    • Dependencies: @types/tz-offset
    • Global values: none

    Credits

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

    Keywords

    none

    Install

    npm i @types/node-cron

    DownloadsWeekly Downloads

    57,461

    Version

    2.0.4

    License

    MIT

    Unpacked Size

    5.37 kB

    Total Files

    4

    Last publish

    Collaborators

    • avatar