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

node-schedule

Package Overview
Dependencies
Maintainers
4
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-schedule - npm Package Compare versions

Comparing version 1.3.1 to 1.3.2

4

lib/schedule.js

@@ -93,3 +93,3 @@

if (reschedule && inv.recurrenceRule.recurs) {
if (reschedule && (inv.recurrenceRule.recurs || inv.recurrenceRule.next)) {
newInv = scheduleNextRecurrence(inv.recurrenceRule, this, inv.fireDate, inv.endDate);

@@ -129,3 +129,3 @@ if (newInv !== null) {

if (reschedule && nextInv.recurrenceRule.recurs) {
if (reschedule && (nextInv.recurrenceRule.recurs || nextInv.recurrenceRule.next)) {
newInv = scheduleNextRecurrence(nextInv.recurrenceRule, this, nextInv.fireDate, nextInv.endDate);

@@ -132,0 +132,0 @@ if (newInv !== null) {

{
"name": "node-schedule",
"version": "1.3.1",
"version": "1.3.2",
"description": "A cron-like and not-cron-like job scheduler for Node.",

@@ -5,0 +5,0 @@ "keywords": [

@@ -384,2 +384,40 @@

},
"Cancelled job reschedules": function(test) {
test.expect(1);
var ok = false;
var job = schedule.scheduleJob('*/1 * * * * *', function () {});
setTimeout(function() {
job.cancel(true);
if (job.nextInvocation() !== null) ok = true;
}, 1250);
setTimeout(function() {
job.cancel();
test.ok(ok);
test.done();
}, 2250);
clock.tick(2250);
},
"CancelNext job reschedules": function(test) {
test.expect(1);
var ok = false;
var job = schedule.scheduleJob('*/1 * * * * *', function () {});
setTimeout(function() {
job.cancelNext();
if (job.nextInvocation() !== null) ok = true;
}, 1250);
setTimeout(function() {
job.cancel();
test.ok(ok);
test.done();
}, 2250);
clock.tick(2250);
},
"Job emits 'canceled' event": function(test) {

@@ -386,0 +424,0 @@ test.expect(1);

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