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

node-cron

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-cron - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

test/scheduling-in-week-day-test.js

2

package.json
{
"name": "node-cron",
"version": "0.0.3",
"version": "0.0.4",
"description": "A simple cron-like task scheduler for Node.js",

@@ -5,0 +5,0 @@ "author": "Lucas Merencia",

# Node Cron
[![npm](https://img.shields.io/npm/l/node-cron.svg)](https://github.com/merencia/node-cron/blob/master/LICENSE.md)
[![npm](https://img.shields.io/npm/v/node-cron.svg)](https://img.shields.io/npm/v/node-cron.svg)
[![Coverage Status](https://coveralls.io/repos/github/merencia/node-cron/badge.svg?branch=master)](https://coveralls.io/github/merencia/node-cron?branch=master)

@@ -8,6 +10,4 @@ [![Dependency Status](https://david-dm.org/merencia/node-cron.svg)](https://david-dm.org/merencia/node-cron)

The node-cron module is tiny task scheduler in pure JavaScrip for node.js based on GNU crontab. Besides, node-cron wont stop your node.js application if your task throw an exception, rather than it going to try run your task again in the next time occurrence.
node-cron is thiny task scheduller in pure and native JavaScrip for node.js based on [GNU crontab](http://www.gnu.org/software/mcron/manual/html_node/Crontab-file.html).
Besides, node-cron wont stop your node.js application if your task throw an exception, rather than it going to try run your task again in the next time occurrence.
## Getting Started

@@ -14,0 +14,0 @@

@@ -14,3 +14,5 @@ 'use strict';

var runOnMonth = matchPattern(patterns[4], time.getMonth() + 1);
var runOnDayOfWeek = matchPattern(patterns[5], time.getDay());
var weekDay = time.getDay();
if (weekDay === 0 ) weekDay = 7;
var runOnDayOfWeek = matchPattern(patterns[5], weekDay);

@@ -35,3 +37,3 @@ if (runInSecond && runOnMinute && runOnHour &&

return pattern === value.toString();
}
};

@@ -38,0 +40,0 @@ setInterval(execution, 1000);

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