pensi-scheduler

1.1.2 • Public • Published

pensi-scheduler is simple scheduler for nodejs. You can create recurrent tasks with different periods.

Note: the period is arbitrary, but I have only tested for hourly and daily tasks.

Sample Usage:

var sched = require('./lib/pensi-scheduler');

var TICKS_TWO_SECS = 2 * 1000;

// create a scheduler with one minute period.
var sm = sched.create({period: TICKS_TWO_SECS});	
sm.addTask('A', new Date(), {name : 'my task'}); // execute a minute from now.

sm.once('interval', function(task){
    console.log('Running Task', task.name, '...');
	sm.stop();
});

sm.start();

Build Status Code Climate

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.1.20latest

Version History

VersionDownloads (Last 7 Days)Published
1.1.20
1.1.10
0.0.80
0.0.70
0.0.60
0.0.50
0.0.40
0.0.30
0.0.20
0.0.10

Package Sidebar

Install

npm i pensi-scheduler

Weekly Downloads

0

Version

1.1.2

License

MIT

Last publish

Collaborators

  • oocoder