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.0 to 1.3.1

17

lib/schedule.js

@@ -191,6 +191,10 @@

// save passed-in value before 'spec' is replaced
if (typeof spec === 'object' && 'tz' in spec) {
tz = spec.tz;
}
if (typeof spec === 'object' && spec.rule) {
start = spec.start || undefined;
end = spec.end || undefined;
tz = spec.tz;
spec = spec.rule;

@@ -402,2 +406,7 @@

RecurrenceRule.prototype.nextInvocationDate = function(base) {
var next = this._nextInvocationDate(base);
return next ? next.toDate() : null;
};
RecurrenceRule.prototype._nextInvocationDate = function(base) {
base = ((base instanceof CronDate) || (base instanceof Date)) ? base : (new Date());

@@ -469,3 +478,3 @@ if (!this.recurs) {

return next ? next.toDate() : null;
return next;
};

@@ -499,3 +508,3 @@

var then = date.getTime();
return lt.setTimeout(function() {

@@ -581,3 +590,3 @@ if (then > Date.now())

var date = (rule instanceof RecurrenceRule) ? rule.nextInvocationDate(prevDate) : rule.next();
var date = (rule instanceof RecurrenceRule) ? rule._nextInvocationDate(prevDate) : rule.next();
if (date === null) {

@@ -584,0 +593,0 @@ return null;

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

@@ -27,3 +27,3 @@ "keywords": [

"dependencies": {
"cron-parser": "^2.4.0",
"cron-parser": "^2.7.3",
"long-timeout": "0.1.1",

@@ -30,0 +30,0 @@ "sorted-array-functions": "^1.0.0"

@@ -168,9 +168,9 @@ # Node Schedule

- `second`
- `minute`
- `hour`
- `date`
- `month`
- `second (0-59)`
- `minute (0-59)`
- `hour (0-23)`
- `date (1-31)`
- `month (0-11)`
- `year`
- `dayOfWeek`
- `dayOfWeek (0-6) Starting with Sunday`

@@ -208,7 +208,7 @@ > **Note**: It's worth noting that the default value of a component of a recurrence rule is

There are some function to get informations for a Job and to handle the Job and
There are some function to get information for a Job and to handle the Job and
Invocations.
#### job.cancel(reshedule)
#### job.cancel(reschedule)
You can invalidate any job with the `cancel()` method:

@@ -222,3 +222,3 @@

#### job.cancelNext(reshedule)
#### job.cancelNext(reschedule)
This method invalidates the next planned invocation or the job.

@@ -225,0 +225,0 @@ When you set the parameter ***reschedule*** to true then the Job is newly scheduled

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