Got a thousand jobs to do? Get an execution plan!

npm install work
1 downloads in the last week
11 downloads in the last month

NPM version Dependency Status Analytics

under construction


Got a thousand jobs to do? Get an execution plan! Work provides a means to build a hierarchy of jobs, executed in the order, and with the strategy provided. Build your own dashboard to monitor events / progress or use the one built it. Work makes use of the Composite Pattern.


var work = require("work");
var housework = new work.Job({ name: "housework" }).add([
        name: "play music", 
        parallel: true,
        command: launchPlaylist,
        args: "Al Green"
        name: "wash dishes",
        command: wash,
        args: [ pots, pans, cutlery ],
        onProgress: {
            name: "change music",
            commandSync: function(){
                // half way through washing the dishes
                if (this.progress.percentComplete == 50){
        onComplete: [
                name: "wipe worktops",
                command: wash,
                args: [ worktops ],
                onSuccess: {
                    name: "procrastinate",
                    command: postFacebookStatus,
                    args: "I'm a model parent and my kids are clever. "
        name: "mop floor",
        command: wash,
        args: [ kitchenFloor, hallFloor ]

// get to work, monitoring progress on stdout


$ npm install work


$ git clone
$ cd work
$ npm test


npm loves you