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.
adonisjs-scheduler
Advanced tools
This package is available in the npm registry.
npm install adonisjs-scheduler
Next, configure the package by running the following command.
node ace configure adonisjs-scheduler
node ace scheduler:run
# or
node ace scheduler:work
// start/scheduler.ts
import Scheduler from "@ioc:Adonis/Addons/Scheduler"
import PurgeUsers from "Commands/PurgeUsers";
Scheduler.command("inspire").everyFiveSeconds();
Scheduler.command(PurgeUsers, ["30 days"]).everyFiveSeconds().withoutOverlapping();
Scheduler.withoutOverlapping(() => {
Scheduler.command("inspire").everySecond();
Scheduler.command(PurgeUsers, ["30 days"]).everyFiveSeconds();
}, { expiresAt: 30_000 });
Scheduler.call(() => {
console.log("Pruge DB!");
}).weekly();
Method | Description |
---|---|
.cron('* * * * *'); | Run the task on a custom cron schedule |
.everyMinute(); | Run the task every minute |
.everyTwoMinutes(); | Run the task every two minutes |
.everyThreeMinutes(); | Run the task every three minutes |
.everyFourMinutes(); | Run the task every four minutes |
.everyFiveMinutes(); | Run the task every five minutes |
.everyTenMinutes(); | Run the task every ten minutes |
.everyFifteenMinutes(); | Run the task every fifteen minutes |
.everyThirtyMinutes(); | Run the task every thirty minutes |
.hourly(); | Run the task every hour |
.everyTwoHours(); | Run the task every two hours |
.everyThreeHours(); | Run the task every three hours |
.everyFourHours(); | Run the task every four hours |
.everyFiveHours(); | Run the task every five hours |
.everySixHours(); | Run the task every six hours |
.daily(); | Run the task every day at midnight |
.weekly(); | Run the task every Sunday at 00:00 |
.monthly(); | Run the task on the first day of every month at 00:00 |
.quarterly(); | Run the task on the first day of every quarter at 00:00 |
.yearly(); | Run the task on the first day of every year at 00:00 |
.immediate(); | Run the task on startup |
.withoutOverlapping(); | Run the task without overlapping |
FAQs
Task scheduler for AdonisJS
We found that adonisjs-scheduler 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.
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.