Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A distributed "cron" type job queue / scheduler, written in node.js and using http to distribute messages across workers.

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 example
Octocat-spinner-32 lib
Octocat-spinner-32 test
Octocat-spinner-32 .gitignore
Octocat-spinner-32 LICENSE
Octocat-spinner-32 Makefile
Octocat-spinner-32 README
Octocat-spinner-32 index.js
Octocat-spinner-32 package.json
README
TOCK

Tock is a feature-rich distributed cron/job queue.  It has the ability to spawn jobs on remote servers using axon as a transport layer, including a basic form of load balancing.  The remote server will spawn the job, and stream the output back to the tock master process.

Included in the tock package is an admin UI and API for creating scheduled jobs, one-off jobs, a dashboard for watching jobs in progress, and statistics about jobs.

Tock uses MongoDB as the internal storage mechanism for schedules, and job results.  The standard out and standard error outputs are stored as files in gridFS.  Mongoose.js is used as the API into MongoDB.

INSTALLATION

Tock is published, so you can just:

npm install tock

Or you can checkout a development version from github:

git clone git@github.com:rfink/tock.git

USAGE

Tock is very easy and intiutive to use.  First, make sure MongoDB is installed either locally, or at an accessible location remotely.  If remote, make sure to edit the "mongo" object in ./lib/config.json.  ./lib/config.json is not included in .gitignore, so that you can manually configure your own.  See ./examples/config.json for a full example configuration (you can likely just copy that).  Also, make sure MongoDB is set up to run on startup.  There shouldn't be any need to make any configuration changes in MongoDB.  To run, use your favorite node / process monitor.  I personally like mongroup (https://github.com/jgallen23/mongroup).  You can also run manually by running node . in this directory.

Once that is done, tock should begin working.  You can control it via the admin UI, located at the port specified in config.json by going to http://{hostName}:{apiPort}/  That's it!
Something went wrong with that request. Please try again.