Skip to content

JavaScript alternative to scheduling tasks with CRON syntax. Instead uses moment duration syntax to define events. Also support specifying specific times of day.

License

Notifications You must be signed in to change notification settings

noInfoPath/noinfopath-scheduler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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": {
				"unit": "h",
				"duration": 4
			}
		},
		"fn": doDoSomthingElse
	};

scheduler.addSchedule(alarmTask);

scheduler.addSchedule(intervalTask);

scheduler.start();

About

JavaScript alternative to scheduling tasks with CRON syntax. Instead uses moment duration syntax to define events. Also support specifying specific times of day.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •