$ gnpm install timers
A tiny cron-like tools for humman, implement by Node.js
$ npm install schedule
var every = require('schedule').every;
every('2s').do(function() {
// do your job
});
You can stop interval when some exception
var every = require('schedule').every;
var ins = every('2 seconds').do(cb);
process.on('uncaughtException', function() {
ins.stop();
})
MIT
Copyright 2013 - present © cnpmjs.org | Home |