
Security News
AI Agent Lands PRs in Major OSS Projects, Targets Maintainers via Cold Outreach
An AI agent is merging PRs into major OSS projects and cold-emailing maintainers to drum up more work.
level-schedule
Advanced tools
Durable job scheduler based on LevelDB. If the process is restarted it will transparently resume where it stopped.
Print some JSON after 5s, even if the process restarts.
var levelup = require('levelup');
var Schedule = require('level-schedule');
var db = levelup('./db');
Schedule(db)
.job('print', function (payload) {
console.log(payload);
})
.run('print', { some : 'json' }, Date.now() + 5000);
// => { some : 'json' }
Run a task every 100ms. Always call this.run at the end of the task,
otherwise if the process crashes while running your task it will be
scheduled once too many.
Schedule(db)
.job('periodic', function () {
console.log('doing some stuff...');
this.run('periodic', Date.now() + 100)
})
.run('periodic', Date.now() + 100);
A job can be synchronous or asynchronous, just use the done argument when
defining an asynchronous job.
Schedule(db)
.job('sync', function (payload) {
if (somethingBadHappend) {
throw new Error();
}
})
.job('async', function (payload, done) {
// notice the 2nd argument
doSomething(function (err) {
done(err);
});
})
.on('error', console.error)
.run('sync')
.run('async');
Setup level-schedule to use db.
Register a job with name and fn.
fn is called with 2 arguments:
payload : The payloaddone : If the job performs async operations, call done() when done. If
an error occured you can pass that as an error argument to done.Run job with payload at timestamp.
Call fn whenever an Error occurs. When no error listener has been
registered, errors will be thrown.
With npm do
$ npm install level-schedule
(MIT)
Copyright (c) 2013 Julian Gruber <julian@juliangruber.com>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
FAQs
Durable job scheduler based on LevelDB
The npm package level-schedule receives a total of 2 weekly downloads. As such, level-schedule popularity was classified as not popular.
We found that level-schedule 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.

Security News
An AI agent is merging PRs into major OSS projects and cold-emailing maintainers to drum up more work.

Research
/Security News
Chrome extension CL Suite by @CLMasters neutralizes 2FA for Facebook and Meta Business accounts while exfiltrating Business Manager contact and analytics data.

Security News
After Matplotlib rejected an AI-written PR, the agent fired back with a blog post, igniting debate over AI contributions and maintainer burden.