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.
adonis-scheduler
Advanced tools
This library provides an easy way to schedule recurring tasks for AdonisJS.
npm install --save adonis-scheduler
Register it in bootstrap/app.js
:
const providers = [
...
'adonis-scheduler/providers/SchedulerProvider'
]
const aliases = {
...
Scheduler: 'Adonis/Addons/Scheduler'
}
Register the commands:
const aceProviders = [
...
'adonis-scheduler/providers/CommandsProvider'
];
...
const commands = [
...
'Adonis/Commands/Scheduler:Run'
];
Starting an instance of the kue listener is easy with the included ace command. Simply run ./ace scheduler:run
.
The provider looks for jobs in the app/Tasks
directory of your AdonisJS project and will automatically register a handler for any tasks that it finds.
Jobs are easy to create. They live in app/Tasks
and they are a simple class. They expose the following static
properties:
Name | Required | type | Description |
---|---|---|---|
schedule | true | many | The schedule for which the task should run. More docs. |
handle | true | function | A function that is called for this task. |
Special thanks to the creator(s) of AdonisJS for creating such a great framework.
FAQs
Easy task scheduling for AdonisJS
The npm package adonis-scheduler receives a total of 1,175 weekly downloads. As such, adonis-scheduler popularity was classified as popular.
We found that adonis-scheduler 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.