
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
@types/node-cron
Advanced tools
TypeScript definitions for node-cron
npm install --save @types/node-cron
This package contains type definitions for node-cron (https://github.com/node-cron/node-cron).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node-cron.
import { EventEmitter } from "events";
/**
* Creates a new task to execute the given function when the cron expression ticks.
* @param cronExpression
* @param func
* @param options
*/
export function schedule(
cronExpression: string,
func: ((now: Date | "manual" | "init") => void) | string,
options?: ScheduleOptions,
): ScheduledTask;
/**
* To validate whether the expression is a cron expression or not
* @param cronExpression
*/
export function validate(cronExpression: string): boolean;
/**
* Get the list of tasks created using the `schedule` function
*/
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;
/**
* Execute task immediately after creation
*/
runOnInit?: boolean;
}
These definitions were written by morsic, burtek, Richard Honor, Ata Berk YILMAZ, Alex Seidmann, and Pedro Américo.
FAQs
TypeScript definitions for node-cron
The npm package @types/node-cron receives a total of 417,084 weekly downloads. As such, @types/node-cron popularity was classified as popular.
We found that @types/node-cron demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.