createManager
The createManager
function creates a Manager
, and is the main entry point into the tinytick
module.
createManager(): Manager
Once you have a reference to the Manager
, you can start and stop it, register tasks and categories, and schedule task runs.
Examples
This example creates a Manager
object and gets its default configuration.
import {createManager} from 'tinytick';
const manager = createManager();
console.log(manager.getManagerConfig(true));
// -> {tickInterval: 100}
This example creates a Manager
object and then starts it immediately. Most of the time you will want to do this so that scheduled tasks start running on time.
import {createManager} from 'tinytick';
const manager = createManager();
manager.start();
Since
v1.0.0