Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
scheduler4js
Advanced tools
Scheduler4js is a library for scheduling tasks in Node.JS. This library makes easier to dynamically create cron jobs running on sql database from client side.
Scheduler4js is a library for scheduling tasks in Node.JS. This library makes easier to dynamically create cron jobs running on sql database from client side.
Feature | scheduler4js |
---|---|
Backend | Postgresql/Mssql |
Priorities | ✓ |
Concurrency | ✓ |
Global events | ✓ |
Atomic ops | ✓ |
Persistence | ✓ |
Supports long running jobs | ✓ |
Supports logging | ✓ |
Supports group jobs | ✓ |
Optimized for | Jobs |
npm i scheduler4js
This library provides a schedule class that accepts a task function and a config representing when the task should be run.
import { Scheduler, Frequency, Timezone, CronUtil } from "scheduler4js";
const { Scheduler, Frequency, Timezone, CronUtil } = require("scheduler4js");
async function example() {
const dbConfig = {
port: 5432,
host: "localhost",
username: "postgres",
password: "password",
dialect: "postgres",
database: "scheduler4js",
logging: false,
};
const config = {
frequency: Frequency.ONCE_IN_HALF_MINUTE,
lockLifetime: 6 * 1000,
type: "x",
kick: true,
};
const scheduler = await Scheduler.init({ dbConfig, config });
scheduler.enqueueJob({
name: "example",
concurrency: 1,
type: "x",
timezone: Timezone.ASIA_DUBAI,
cron: CronUtil.EVERY_X_MINUTE(1),
lockLimit: 1,
saveLog: false,
priority: 0,
fn: () => {
console.log(`Job run at the time of ${new Date()}`);
},
});
scheduler.on("begin", (job) => {
console.log("begin", job);
});
scheduler.on("completed", (job) => {
console.log("completed", job);
});
scheduler.on("fail", (err, job) => {
console.log("fail", err, job);
});
}
example();
Schedules a task to repeat at the specified date.
FAQs
Scheduler4js is a library for scheduling tasks in Node.JS. This library makes easier to dynamically create cron jobs running on sql database from client side.
We found that scheduler4js demonstrated a not healthy version release cadence and project activity because the last version was released 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.