1.1.3 • Published 1 year ago

minicall v1.1.3

Weekly downloads
2
License
MIT
Repository
github
Last release
1 year ago

Minimalistic JS task scheduler 🛵

Extremely minimalistic and simple task scheduler built in just 2 hours due to frustration with the bugs, dependencies, and heavy bundle weight of the current popular task scheduler libraries in JavaScript. 😤

This library is very humble and doesn't compete in terms of features, but it is simple 🎈:

  • Supports both browser and node environments.
  • Only requires two simple parameters, with no useless ones.
  • Has no dependencies and is lightweight, with a size of only 1.6kB. 🕊️
  • No unexpected schedule, no bugs, no nonsense.

Installation

yarn add minicall

Quick start

import minicall from 'minicall'

const task = new minicall({
    time: ["12:34:56", "22:22:22"], //Based on UTC time 
    execute: () => console.log('task to execute'),
})

task.start()

With a filter

import minicall from 'minicall'

const task = new minicall({
    time: ["03:00:00"],
    execute: () => console.log('task to execute'),
    filter: (): boolean => [1, 3, 5].includes(new Date().getDay()) //only on Monday, Wednesday and Friday.
})

task.start()
1.1.1

1 year ago

1.1.0

1 year ago

1.1.3

1 year ago

1.1.2

1 year ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago