New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

node-schedule

Package Overview
Dependencies
Maintainers
0
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 0.1.2 to 0.1.3

24

lib/schedule.js

@@ -27,3 +27,3 @@ /*

// give us a random name if one wasn't provided
if (typeof(name) == 'undefined' || name === null)
if (name == null)
name = '<Anonymous Job ' + (++anonJobCounter) + '>';

@@ -131,3 +131,3 @@

}
else if (typeof(spec) == 'string' || (typeof(spect) == 'object' && spec instanceof String))
else if (typeof(spec) == 'string' || (typeof(spec) == 'object' && spec instanceof String))
{

@@ -232,9 +232,9 @@ spec = RecurrenceRule.fromCronString(spec);

this.year = (typeof(year) != 'undefined') ? year : null;
this.month = (typeof(month) != 'undefined') ? month : null;
this.date = (typeof(date) != 'undefined') ? date : null;
this.dayOfWeek = (typeof(dayOfWeek) != 'undefined') ? dayOfWeek : null;
this.hour = (typeof(hour) != 'undefined') ? hour : null;
this.minute = (typeof(minute) != 'undefined') ? minute : null;
this.second = (typeof(second) != 'undefined') ? second : 0;
this.year = (year == null) ? null : year;
this.month = (month == null) ? null : month;
this.date = (date == null) ? null : date;
this.dayOfWeek = (dayOfWeek == null) ? null : dayOfWeek;
this.hour = (hour == null) ? null : hour;
this.minute = (minute == null) ? null : minute;
this.second = (second == null) ? 0 : second;
}

@@ -248,4 +248,4 @@

min = (typeof(min) != 'undefined' && min !== null) ? min : -1;
max = (typeof(max) != 'undefined' && max !== null) ? max : -1;
min = (min == null) ? -1 : min;
max = (max == null) ? -1 : max;
shiftIdxs = (typeof(shiftIdxs) == 'boolean') ? shiftIdxs : false;

@@ -458,3 +458,3 @@

function recurMatch(val, matcher){
if (typeof(matcher) == 'undefined' || matcher === null)
if (matcher == null)
return true;

@@ -461,0 +461,0 @@

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

@@ -5,0 +5,0 @@ "keywords": ["schedule", "task", "job", "cron"],

node-schedule
=============
node-schedule is a cron-like and not-cron-like job scheduler for Node. It allows you to schedule jobs (arbitrary functions) for execution at specific dates, with optional recurrence rules.
node-schedule is a cron-like and not-cron-like job scheduler for Node. It allows you to schedule jobs (arbitrary functions) for execution at specific dates, with optional recurrence rules. It only uses a single timer at any given time (rather than reevaluating upcoming jobs every second/minute), and is MIT-licensed (see below).

@@ -89,1 +89,23 @@ node-schedule is for time-based scheduling, not interval-based scheduling. While you can easily bend it to your will, if you only want to do something like "run this function every 5 minutes", you'll find `setInterval` much easier to use, and far more appropriate. But if you want to, say, "run this function at the :20 and :50 of every hour on the third Tuesday of every month," you'll find that node-schedule suits your needs better.

npm install node-schedule
License
-------
Copyright (C) 2011 Matt Patenaude.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
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