• Version 3.0.7
  • Published
  • 6.72 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 | 'manual' | 'init') => void),
    options?: ScheduleOptions
    ) => ScheduledTask;

      function validate

      validate: (cronExpression: string) => boolean;


        interface ScheduledTask

        interface ScheduledTask extends EventEmitter {}

          property now

          now: (now?: Date) => void;

            property start

            start: () => void;

              property stop

              stop: () => void;

                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 runOnInit

                  runOnInit?: boolean;
                  • Execute task immediately after creation

                  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>