GitHub - ans-4175/node-cron: A simple cron-like job scheduler for Node.js · GitHub
Skip to content

ans-4175/node-cron

 
 

Folders and files

Repository files navigation

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.

About

A simple cron-like job scheduler for Node.js

Resources

License

Stars

Watchers

Forks

Packages

Contributors

Languages

  • JavaScript 100.0%