node package manager
Easy sharing. Manage teams and permissions with one click. Create a free org ยป


simple redis backed jobs runner


npm install jobs


var jobs = require("jobs"); var runner = new jobs(client, key);

Here, client is a redis client, and key is a unique reference to your queues. Internally it uses 3 keys: {key}_completed, {key}_queued, and {key}_errored. To set a job, rpush to {key}_queued.


node test.js

./redis-cli rpush node-jobs-test_queued "{"type":"log","msg":"hello"}"

--> this should output a log message on the server "hello"

llen node-jobs-test_queued --> number of jobs queued llen node-jobs-test_completed --> number of jobs completed llen node-jobs-test_errored --> number of jobs errored