noinfopath-scheduler

1.1.11 • Public • Published

noinfopath-scheduler

NPM

Overview

JavaScript task scheduler that uses MomentJs duration syntax to define events. Also support specifying specific times of day.

Installation

npm install noinfopath-scheduler --save

Usage

For more details see the documentation page.

 
function doDoSomething() {}
 
function doDoSomthingElse() {}
 
var scheduler = require("noinfopath-scheduler"),
    alarmTask = {
        "job": {
            "name": "My Task that does something",
            "type": "alarm",
            "schedule": {
                "weekday": "tuesday",
                "time": "22:30"
            }
        },
        "fn": doDoSomething
    },
    intervalTask = {
        "job": {
            "name": "My Task that does something else",
            "schedule": {
                "interval": "h",
                "duration": "4"
            }
        },
        "fn": doDoSomthingElse
    };
 
scheduler.addSchedule(alarmTask);
 
scheduler.addSchedule(intervalTask);
 
scheduler.start();
 

Package Sidebar

Install

npm i noinfopath-scheduler

Weekly Downloads

1

Version

1.1.11

License

MIT

Unpacked Size

251 kB

Total Files

24

Last publish

Collaborators

  • noinfopath