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.
npm install auto-tasker
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);
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);
const { ScheduleBuilder } = require("auto-tasker");
const callBackTask = () => {
console.log("hello world");
};
const schedule = new ScheduleBuilder();
const scheduleCron = schedule.on("monday").every("hour").do(callBackTask);
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);
const { ScheduleBuilder } = require("auto-tasker");
const callBackTask = () => {
console.log("Task running every hour");
};
const schedule = new ScheduleBuilder();
const scheduleCron = schedule.every("hour").do(callBackTask);
- Human-readable syntax for scheduling tasks.
- Supports scheduling tasks on specific days of the week.
- Converts time formats like "10:00 am" to cron expressions.
- Supports scheduling tasks to run every hour, day, week, or month.
- Easy-to-use API for scheduling tasks.
MIT
Please follow the contributing guidelines.