Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

croner

Package Overview
Dependencies
Maintainers
1
Versions
228
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

croner - npm Package Compare versions

Comparing version 4.0.65 to 4.0.66

2

package.json
{
"name": "croner",
"version": "4.0.65",
"version": "4.0.66",
"description": "Trigger functions in javascript using Cron syntax. No deps. All features.",

@@ -5,0 +5,0 @@ "author": "Hexagon <github.com/hexagon>",

@@ -96,3 +96,3 @@ <p align="center">

let msToNext = job.msToNext( /*optional*/ previosRun ); // Milliseconds left to next execution
let isRunning = job.isRunning();
let isRunning = job.running();

@@ -99,0 +99,0 @@ // Control scheduled execution

@@ -32,35 +32,11 @@ export default Cron;

/**
* - Stop current job
*/
export type CronJobStop = Function;
/**
* - Resume current job
*/
export type CronJobResume = Function;
/**
* - Cron job control functions
*/
export type CronJob = {
stop: CronJobStop;
pause: CronJobResume;
resume: Function;
};
/**
* Cron entrypoint
*
* @signature
* @constructor
* @param {string} pattern - Input pattern
* @param {CronOptions | Function} [options] - Options
* @param {CronOptions} [options] - Options
* @param {Function} [fn] - Function to be run each iteration of pattern
* @returns {Cron}
*
* @signature
* @constructor
* @param {string} pattern - Input pattern
* @param {CronOptions | Function} [options] - Options
* @param {Function} [fn] - Function to be run each iteration of pattern
* @returns {CronJob}
*/
export function Cron(pattern: string, options?: CronOptions | Function, fn?: Function): Cron;
export function Cron(pattern: string, options?: CronOptions, fn?: Function): Cron;
export class Cron {

@@ -70,17 +46,9 @@ /**

*
* @signature
* @constructor
* @param {string} pattern - Input pattern
* @param {CronOptions | Function} [options] - Options
* @param {CronOptions} [options] - Options
* @param {Function} [fn] - Function to be run each iteration of pattern
* @returns {Cron}
*
* @signature
* @constructor
* @param {string} pattern - Input pattern
* @param {CronOptions | Function} [options] - Options
* @param {Function} [fn] - Function to be run each iteration of pattern
* @returns {CronJob}
*/
constructor(pattern: string, options?: CronOptions | Function, fn?: Function);
constructor(pattern: string, options?: CronOptions, fn?: Function);
/** @type {CronPattern} */

@@ -146,7 +114,7 @@ pattern: CronPattern;

* @param {Function} func - Function to be run each iteration of pattern
* @returns {CronJob}
* @returns {Cron}
*/
public schedule(func: Function): CronJob;
public schedule(func: Function): Cron;
}
import { CronPattern } from "./pattern.js";
import { CronDate } from "./date.js";

@@ -1,8 +0,25 @@

export type CronPatternPart = "seconds" | "minutes" | "hours" | "days" | "months" | "daysOfWeek";
export type CronIndexOffset = 0 | -1;
/**
* @typedef {"seconds" | "minutes" | "hours" | "days" | "months" | "daysOfWeek"} CronPatternPart
* @typedef {0 | -1} CronIndexOffset
* Name for each part of the cron pattern
*/
export type CronPatternPart = ("seconds" | "minutes" | "hours" | "days" | "months" | "daysOfWeek");
/**
* Offset, 0 or -1.
*
* 0 for seconds,minutes and hours as they start on 1.
* -1 on days and months, as the start on 0
*/
export type CronIndexOffset = number;
/**
* Name for each part of the cron pattern
* @typedef {("seconds" | "minutes" | "hours" | "days" | "months" | "daysOfWeek")} CronPatternPart
*/
/**
* Offset, 0 or -1.
*
* 0 for seconds,minutes and hours as they start on 1.
* -1 on days and months, as the start on 0
*
* @typedef {Number} CronIndexOffset
*/
/**
* Create a CronPattern instance from pattern string ('* * * * * *')

@@ -15,6 +32,14 @@ * @constructor

/**
* @typedef {"seconds" | "minutes" | "hours" | "days" | "months" | "daysOfWeek"} CronPatternPart
* @typedef {0 | -1} CronIndexOffset
* Name for each part of the cron pattern
* @typedef {("seconds" | "minutes" | "hours" | "days" | "months" | "daysOfWeek")} CronPatternPart
*/
/**
* Offset, 0 or -1.
*
* 0 for seconds,minutes and hours as they start on 1.
* -1 on days and months, as the start on 0
*
* @typedef {Number} CronIndexOffset
*/
/**
* Create a CronPattern instance from pattern string ('* * * * * *')

@@ -21,0 +46,0 @@ * @constructor

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc