auto-tasker
v0.0.7
Published
A Node.js scheduling utility that simplifies task scheduling with human-readable syntax. Convert intuitive time formats into cron expressions and schedule tasks effortlessly using node-schedule
Downloads
51
Maintainers
Readme
auto-tasks
A Node.js scheduling utility that simplifies task scheduling with human-readable syntax. Convert intuitive time formats into cron expressions and schedule tasks effortlessly using node-cron.
Installation
npm install auto-tasker
Usage
Example-1:
const { ScheduleBuilder } = require("auto-tasker");
const callBackTask = () => {
console.log("hello world");
};
const schedule = new ScheduleBuilder();
const scheduleCron = schedule
.every("week")
.on("monday")
.at("05:30", "pm")
.do(callBackTask);
Example-2:
const { ScheduleBuilder } = require("auto-tasker");
const callBackTask = () => {
console.log("hello world");
};
const schedule = new ScheduleBuilder();
const scheduleCron = schedule.every("day").at("10:00", "am").do(callBackTask);
Example-3:
const { ScheduleBuilder } = require("auto-tasker");
const callBackTask = () => {
console.log("hello world");
};
const schedule = new ScheduleBuilder();
const scheduleCron = schedule.every("hour").on("monday").do(callBackTask);
Example-4:
const { ScheduleBuilder } = require("auto-tasker");
const callBackTask = () => {
console.log("hello world");
};
const schedule = new ScheduleBuilder();
const scheduleCron = schedule.on("tuesday").at("10:00", "am").do(callBackTask);
License
MIT
Contributing
Please follow the contributing guidelines.