@types/node-cron
- Version 3.0.11
- Published
- 6.23 kB
- No dependencies
- MIT license
Install
npm i @types/node-cron
yarn add @types/node-cron
pnpm add @types/node-cron
Overview
TypeScript definitions for node-cron
Index
Functions
function getTasks
getTasks: () => Map<string, ScheduledTask>;
Get the list of tasks created using the
schedule
function
function schedule
schedule: ( cronExpression: string, func: string | ((now: Date | 'manual' | 'init') => void), options?: ScheduleOptions) => ScheduledTask;
Creates a new task to execute the given function when the cron expression ticks.
Parameter cronExpression
Parameter func
Parameter options
function validate
validate: (cronExpression: string) => boolean;
To validate whether the expression is a cron expression or not
Parameter cronExpression
Interfaces
interface ScheduledTask
interface ScheduledTask extends EventEmitter {}
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.
Badge
To add a badge like this oneto 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[![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@types/node-cron)
- 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>
- Updated .
Package analyzed in 1077 ms. - Missing or incorrect documentation? Open an issue for this package.