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

@types/cron

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/cron - npm Package Compare versions

Comparing version 1.3.0 to 1.6.0

27

cron/index.d.ts

@@ -1,2 +0,2 @@

// Type definitions for cron 1.3
// Type definitions for cron 1.6
// Project: https://www.npmjs.com/package/cron

@@ -12,4 +12,5 @@ // Definitions by: Hiroki Horiuchi <https://github.com/horiuchi>

* @param zone Timezone name. You can check all timezones available at [Moment Timezone Website](http://momentjs.com/timezone/).
* @param utcOffset UTC offset. Don't use both ```zone``` and ```utcOffset``` together or weird things may happen.
*/
constructor(source: string | Date, zone?: string);
constructor(source: string | Date, zone?: string, utcOffset?: string | number);

@@ -33,15 +34,15 @@ /**

/**
* The function to fire at the specified time.
* The function to fire at the specified time. If an ```onComplete``` callback was provided, ```onTick``` will receive it as an argument. ```onTick``` may call ```onComplete``` when it has finished its work.
*/
onTick: () => void;
/**
* A function that will fire when the job is complete, when it is stopped.
* A function that will fire when the job is stopped with ```job.stop()```, and may also be called by ```onTick``` at the end of each run.
*/
onComplete?: () => void;
/**
* Specifies whether to start the job just before exiting the constructor. By default this is set to false. If left at default you will need to call ```job.start()``` in order to start the job (assuming ```job``` is the variable you set the cronjob to). This does not immediately fire your onTick function, it just gives you more control over the behavior of your jobs.
* Specifies whether to start the job just before exiting the constructor. By default this is set to false. If left at default you will need to call ```job.start()``` in order to start the job (assuming ```job``` is the variable you set the cronjob to). This does not immediately fire your ```onTick``` function, it just gives you more control over the behavior of your jobs.
*/
start?: boolean;
/**
* Specify the timezone for the execution. This will modify the actual time relative to your timezone. If the timezone is invalid, an error is thrown. You can check all timezones available at [Moment Timezone Website](http://momentjs.com/timezone/).
* Specify the timezone for the execution. This will modify the actual time relative to your timezone. If the timezone is invalid, an error is thrown. You can check all timezones available at [Moment Timezone Website](http://momentjs.com/timezone/). Probably don't use both ```timeZone``` and ```utcOffset``` together or weird things may happen.
*/

@@ -57,2 +58,10 @@ timeZone?: string;

runOnInit?: boolean;
/**
* This allows you to specify the offset of your timezone rather than using the ```timeZone``` param. Probably don't use both ```timeZone``` and ```utcOffset``` together or weird things may happen.
*/
utcOffset?: string | number;
/**
* If you have code that keeps the event loop running and want to stop the node process when that finishes regardless of the state of your cronjob, you can do so making use of this parameter. This is off by default and cron will run as if it needs to control the event loop. For more information take a look at [timers#timers_timeout_unref](https://nodejs.org/api/timers.html#timers_timeout_unref) from the NodeJS docs.
*/
unrefTimeout?: boolean;
}

@@ -79,4 +88,6 @@

* @param runOnInit This will immediately fire your ```onTick``` function as soon as the requisit initialization has happened. This option is set to ```false``` by default for backwards compatibility.
* @param utcOffset This allows you to specify the offset of your timezone rather than using the ```timeZone``` param. Probably don't use both ```timeZone``` and ```utcOffset``` together or weird things may happen.
* @param unrefTimeout If you have code that keeps the event loop running and want to stop the node process when that finishes regardless of the state of your cronjob, you can do so making use of this parameter. This is off by default and cron will run as if it needs to control the event loop. For more information take a look at [timers#timers_timeout_unref](https://nodejs.org/api/timers.html#timers_timeout_unref) from the NodeJS docs.
*/
constructor(cronTime: string | Date, onTick: () => void, onComplete?: () => void, start?: boolean, timeZone?: string, context?: any, runOnInit?: boolean);
constructor(cronTime: string | Date, onTick: () => void, onComplete?: () => void, start?: boolean, timeZone?: string, context?: any, runOnInit?: boolean, utcOffset?: string | number, unrefTimeout?: boolean);
/**

@@ -118,3 +129,3 @@ * Create a new ```CronJob```.

export declare var job:
((cronTime: string | Date, onTick: () => void, onComplete?: () => void, start?: boolean, timeZone?: string, context?: any, runOnInit?: boolean) => CronJob)
((cronTime: string | Date, onTick: () => void, onComplete?: () => void, start?: boolean, timeZone?: string, context?: any, runOnInit?: boolean, utcOffset?: string | number, unrefTimeout?: boolean) => CronJob)
| ((options: CronJobParameters) => CronJob);

@@ -121,0 +132,0 @@ export declare var time: (source: string | Date, zone?: string) => CronTime;

{
"name": "@types/cron",
"version": "1.3.0",
"version": "1.6.0",
"description": "TypeScript definitions for cron",

@@ -19,10 +19,11 @@ "license": "MIT",

"main": "",
"types": "index",
"repository": {
"type": "git",
"url": "https://www.github.com/DefinitelyTyped/DefinitelyTyped.git"
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git"
},
"scripts": {},
"dependencies": {},
"typesPublisherContentHash": "d5344fc2df82f7b5c9c8aab225630224856b904a78a06000c5c7b3a225d41d0e",
"typesPublisherContentHash": "9f082684e31ee8a8a6778fb0fc9bb81909019110b24f4735e4c5bb56956af6e7",
"typeScriptVersion": "2.0"
}

@@ -5,9 +5,9 @@ # Installation

# Summary
This package contains type definitions for cron (https://www.npmjs.com/package/cron).
This package contains type definitions for cron ( https://www.npmjs.com/package/cron ).
# Details
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/cron
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/cron
Additional Details
* Last updated: Tue, 03 Apr 2018 20:45:29 GMT
* Last updated: Fri, 01 Feb 2019 05:29:43 GMT
* Dependencies: none

@@ -14,0 +14,0 @@ * Global values: none

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