Skip to content
/ tock Public

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

License

Notifications You must be signed in to change notification settings

rfink/tock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

96 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 [email protected]: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!

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published