
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
A simple cron task library for node.js with some useful features. Like assigning a name to task and getting the task by name. or category to task and getting the task by category.
cron-task is a module for scheduling tasks at specific time intervals using cron expressions or milliseconds. You can easily add, remove, start, and stop tasks.
To install cron-task, run the following command:
npm install cron-task
const { CronTaskScheduler } = require('cron-task');
// Create scheduler instance
const scheduler = new CronTaskScheduler();
// Add a simple "Hello World" task that runs every 3 seconds
scheduler.addTask({
name: 'helloWorldTask',
interval: 3000, // 3 seconds in milliseconds
onTick: () => {
console.log('Hello World!', new Date().toLocaleTimeString());
}
});
console.log('Scheduler started. Press Ctrl+C to stop.');
task: Object describing the task with the following properties:
id: unique uuid for task (this not be send on creation)name: Unique name for the task.category (optional): Task category.interval: Interval in milliseconds or cron expression.onTick: Function executed at each interval.addTask(task: Omit<Task, 'id'>): TaskgetTasks(): Task[]getTaskById(id:string): voidgetTasksByName(name: string): Task[]getTasksByCategory(category: string): Task[]removeTaskById(id:string): voidremoveTaskByName(name: string): voidremoveTasksByCategory(category: string): voidremoveAllTasks(): voidstartTaskById(id: string): voidstartTaskByName(name: string): voidstopTaskByName(name: string): voidstopAllTasksByCategory(category: string): voidupdateTaskById(id:string): void* * * * *
- - - - -
| | | | |
| | | | +---- Day of the week (0 - 7) (Sunday=0 or 7)
| | | +------ Month (1 - 12)
| | +-------- Day of the month (1 - 31)
| +---------- Hour (0 - 23)
+------------ Minute (0 - 59)
If you encounter any issues or have suggestions, feel free to open an issue or submit a pull request.
Thanks for contributing!
FAQs
A simple cron task library for node.js with some useful features. Like assigning a name to task and getting the task by name. or category to task and getting the task by category.
We found that cron-task demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.