2.0.1 • Published 4 years ago

@yobo/queue v2.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

Queue

Package to call periodic callbacks within an interval given a time range.

API

  • start(options): String

    Receives an object with the options {startTime: String, endTime: String, interval: Number, action: function, onStart: function, onStop: function}, and the function to be called.

    Example:

    start({ 
      startTime: "09:00", 
      endTime: "23:30", 
      interval: 15, 
      action: () => console.log("Hello World!")
    });

    With this configuration, a queue is created, which prints Hello world every 15 minutes between 09:00-23:30 every day.

    Returns the queue id.

  • stop(id): Void

    Stops the queue with the given id.

  • updateOptions(id, options): Void

    Updates the options of the specified queue. Expects an object with at least one of the options used in start

2.0.1

4 years ago

2.0.0

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago