node-schedule 1.2.4 → 1.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/schedule.js CHANGED
@@ -493,13 +493,8 @@ function recurMatch(val, matcher) {
493
493
  function runOnDate(date, job) {
494
494
  var now = (new Date()).getTime();
495
495
  var then = date.getTime();
496
-
497
- if (then < now) {
498
- setImmediate(job);
499
- return null;
500
- }
501
-
502
- return lt.setTimeout(job, (then - now));
496
+
497
+ return lt.setTimeout(job, (then < now ? 0 : then - now));
503
498
  }
504
499
 
505
500
  var invocations = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-schedule",
3
- "version": "1.2.4",
3
+ "version": "1.2.5",
4
4
  "description": "A cron-like and not-cron-like job scheduler for Node.",
5
5
  "keywords": [
6
6
  "schedule",
package/test/.eslintrc DELETED
@@ -1,5 +0,0 @@
1
- {
2
- "rules": {
3
- "quotes": ["off"]
4
- }
5
- }