• Version 3.0.4
  • Published
  • 6.11 kB
  • No dependencies
  • MIT license


npm i @types/node-cron
yarn add @types/node-cron
pnpm add @types/node-cron


TypeScript definitions for node-cron



function getTasks

getTasks: () => Map<string, ScheduledTask>;

    function schedule

    schedule: (
    cronExpression: string,
    func: string | ((now: Date) => void),
    options?: ScheduleOptions
    ) => ScheduledTask;

      function validate

      validate: (cronExpression: string) => boolean;


        interface ScheduledTask

        interface ScheduledTask extends EventEmitter {}

          property start

          start: () => this;

            property stop

            stop: () => this;

              interface ScheduleOptions

              interface ScheduleOptions {}

                property name

                name?: string;
                • The schedule name

                property recoverMissedExecutions

                recoverMissedExecutions?: boolean;
                • Specifies whether to recover missed executions instead of skipping them.

                  Defaults to false

                property scheduled

                scheduled?: boolean | undefined;
                • A boolean to set if the created task is scheduled.

                  Defaults to true

                property timezone

                timezone?: string;
                • The timezone that is used for job scheduling

                Package Files (1)

                Dependencies (0)

                No dependencies.

                Dev Dependencies (0)

                No dev dependencies.

                Peer Dependencies (0)

                No peer dependencies.


                To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@types/node-cron.

                • Markdown
                • HTML
                  <a href="https://www.jsdocs.io/package/@types/node-cron"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>