Socket
Socket
Sign inDemoInstall

cron

Package Overview
Dependencies
14
Maintainers
2
Versions
66
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.8.1 to 1.8.2

2

examples/basic.js
const CronJob = require('../lib/cron.js').CronJob;
console.log('Before job instantiation');
const job = new CronJob('* * * * * *', function() {
const job = new CronJob('* * 7-23 * * *', function() {
const d = new Date();

@@ -6,0 +6,0 @@ console.log('Every second:', d);

@@ -457,7 +457,10 @@ (function(root, factory) {

allRanges[i].replace(rangePattern, function($0, lower, upper, step) {
const wasStepDefined = !isNaN(parseInt(step));
lower = parseInt(lower, 10);
upper = parseInt(upper, 10) || undefined;
const wasStepDefined = !isNaN(parseInt(step, 10));
if (step === '0') {
throw new Error('Field (' + field + ') has a step of zero');
}
step = parseInt(step) || 1;
step = parseInt(step, 10) || 1;

@@ -464,0 +467,0 @@ if (upper && lower > upper) {

{
"name": "cron",
"description": "Cron jobs for your node",
"version": "1.8.1",
"version": "1.8.2",
"author": "Nick Campbell <nicholas.j.campbell@gmail.com> (http://github.com/ncb000gt)",

@@ -6,0 +6,0 @@ "bugs": {

@@ -48,5 +48,6 @@ node-cron

var CronJob = require('cron').CronJob;
new CronJob('* * * * * *', function() {
var job = new CronJob('* * * * * *', function() {
console.log('You will see this message every second');
}, null, true, 'America/Los_Angeles');
job.start();
```

@@ -53,0 +54,0 @@

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc