Skip to content

Latest commit

 

History

History
29 lines (22 loc) · 500 Bytes

README.md

File metadata and controls

29 lines (22 loc) · 500 Bytes

jadwalin

Scheduling task with JavaScript

Installation

$ yarn install jadwalin

Usage

const jadwalin = require('jadwalin');

const task1 = () => {
  const now = new Date();
  console.log(now + ': selamat pagi hayati 1');
};

const task2 = () => {
  const now = new Date();
  console.log(now + ': selamat pagi hayati 2');
};

const scheduler1 = new jadwalin(task1);
const scheduler2 = new jadwalin(task2);

scheduler1.setiap(2000);
scheduler2.setiapJam('3:28');