0.1.3 • Published 12 years ago

recurrent v0.1.3

Weekly downloads
4
License
-
Repository
github
Last release
12 years ago

recurrent

Build Status

A redis-backed manager of recurrent jobs, for node.js.

(immature, with minimal testing and probably nasty bugs)

Features

  • multiple queues, backed up by redis
  • tasks have a permanent unique id and mutable associated data
  • failed job runs are retried until they succeed or give up, with exponential back-off
  • job retries and repetitions don't pile up
  • the worker's job implementation determines at the end of each run when (and whether) to repeat
  • as many worker processes as you want spread over multiple cores and machines - but you have to start them

Caveats

  • single point of failure in queue manager (as well as redis itself) - you need to make sure it stays up / restarts quickly and there's exactly 1 instance

Installing

npm install recurrent

Running the manager

Make sure redis is running and then:

recurrent offers a (currently very incomplete) web UI:

And then browse to localhost:7654

When the manager is not needed anymore:

Starting a recurrent job

Adding again the same taskId will reset execution time.

When the client is not needed any more:

Recurrent job workers

When the job worker is not needed any more:

Task failure

Workers must not throw.

To signal failure a worker calls back with error. It can specify a retry time:

Or let recurrent do exponential back-off

Exponential back-off can be configured per worker:

When a task is being retried after failure task.retries contains how many retries have been attempted (including the current one). It will undefined for the first execution, 1 for the first retry and so on.

0.1.3

12 years ago

0.1.2

12 years ago

0.1.1

12 years ago

0.1.0

12 years ago