JSPM

  • Created
  • Published
  • Downloads 1407644
  • Score
    100M100P100Q185711F
  • License ISC

A simple cron-like task scheduler for Node.js

Package Exports

  • node-cron

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (node-cron) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Node Cron

npm npm Coverage Status Dependency Status devDependency Status Build Status

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.

Getting Started

Install node-cron using npm:

$ npm install --save node-cron

Import node-cron and schedule a task:

var cron = require('node-cron');

cron.schedule('* * * * *', function(){
  console.log('running a task in every minute');
});

Quick Cron Reference


 # ┌───────────── min (0 - 59)
 # │ ┌────────────── hour (0 - 23)
 # │ │ ┌─────────────── day of month (1 - 31)
 # │ │ │ ┌──────────────── month (1 - 12)
 # │ │ │ │ ┌───────────────── day of week (0 - 6) (0 to 6 are Sunday to Saturday)
 # │ │ │ │ │
 # │ │ │ │ │
 # * * * * *

Issues

Feel free to submit issues and enhancement requests here.

Contributors

In general, we follow the "fork-and-pull" Git workflow.

  • Fork the repo on GitHub;
  • Commit changes to a branch in your fork;
  • Pull request "upstream" with your changes;

NOTE: Be sure to merge the latest from "upstream" before making a pull request!

Please do not contribute code you did not write yourself, unless you are certain you have the legal ability to do so. Also ensure all contributed code can be distributed under the ISC License.

License

node-cron is under ISC License.