Research
Recent Trends in Malicious Packages Targeting Discord
The Socket research team breaks down a sampling of malicious packages that download and execute files, among other suspicious behaviors, targeting the popular Discord platform.
redis-scheduler
Advanced tools
Readme
Use redis keyspace notifications to trigger timed events inspired by http://blog.codezuki.com/blog/2013/07/07/redis-queue.
notify-keyspace-events Ex
in redis configuration file.$ npm install redis-scheduler
Create a new scheduler instance
var Scheduler = require('redis-scheduler');
var scheduler = new Scheduler({ host: 'localhost', port: 6379 });
#new Scheduler(options)
Add a timed event.
var expirationTime = 1000;
function eventTriggered(err, key) {
console.log(key + ' triggered');
}
scheduler.schedule({ key: 'test-key', expire: expirationTime, handler: eventTriggered }, function (err) {
// Schedule set
});
#schedule(options, cb)
You can add multiple handlers per event.
scheduler.addHandler({ key: 'test-key', handler: function () {
console.log('another event');
}});
#addHandler(options, fn)
###Rescheduling an Event###
Reschedules a scheduled event. Will take either a new date to trigger or explicit milliseconds.
scheduler.reschedule({ key: 'test-key', expire: 3000 }, function () {
console.log('rescheduled');
});
#reschedule(options, cb)
###Cancel scheduled item###
Cancels a scheduled event and cleans up handlers
scheduler.cancel({ key: 'test-key' }, function () {
console.log('canceled');
});
#cancel(options)
###A event pattern matching ###Close scheduler###
Disconnects and closes all connections to redis and cleans up all existing event handlers
#end()
Clone the repo and run from the project root:
$ npm install
$ npm test
$ cd examples/events
$ npm install
$ node simple.js
$ node multi-handlers.js
$ node loop.js
$ node reschedule.js
FAQs
Use redis keyspace notifications to trigger timed events
The npm package redis-scheduler receives a total of 70 weekly downloads. As such, redis-scheduler popularity was classified as not popular.
We found that redis-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
The Socket research team breaks down a sampling of malicious packages that download and execute files, among other suspicious behaviors, targeting the popular Discord platform.
Security News
Socket CEO Feross Aboukhadijeh joins a16z partners to discuss how modern, sophisticated supply chain attacks require AI-driven defenses and explore the challenges and solutions in leveraging AI for threat detection early in the development life cycle.
Security News
NIST's new AI Risk Management Framework aims to enhance the security and reliability of generative AI systems and address the unique challenges of malicious AI exploits.