0.0.3 • Published 5 years ago

@framorim/teatime v0.0.3

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

TeaTime

TeaTime is a simple Job Schedule for NodeJS. Don't miss your tea!

Installation:

npm install @framorim/teatime --save

or

npm install -g @framorim/teatime

Usage:

Import the module into your project

const TeaTime = require('@framorim/teatime')

Create a new TeaTime

const schedule = new TeaTime();
const options = {
  hour: 3,
  weekday: '*'
};

schedule.addJob('<JOB_NAME>', options, async () => {
  /*...YOUR LOGIC GOES HERE ...*/
});

Specifications:

Methods:

MethodsDescriptionReady
addJob()Creates a job in the manager
stopJob()Only stops a job in the manager
deleteJob()Deletes a job from the manager
setJob()Sets a job in the manager
restartJob()Restarts job in the manager

Options:

OptionDescription
minuteRepresents minute in numbers
hourRepresents hour in numbers
weekdayRepresents weekday in numbers