
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy 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 0 open source maintainers 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
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.