Skip to content

Commit

Permalink
update config files
Browse files Browse the repository at this point in the history
  • Loading branch information
Natsuke committed Sep 7, 2015
1 parent 901b216 commit 903a94f
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
language: nodejs
nodejs:
- 0.10
- 0.12
- iojs-v1
- iojs-v2
- iojs-v3
- iojs
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Cron-cluster
Ensure that a cron is launched only for a node app when it was clustered

## Install
```bash
npm install cron-cluster
```

## Usage
```js
var redis = require('redis').createClient()
var CronJob = require('cron-cluster')(redis).CronJob

function doCron () {
var job = new CronJob('* * * * * *', function () {
// Do some stuff here
})
job.start()
}
```
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
require('./lib/cron-cluster')
module.exports = require('./lib/cron-cluster')
11 changes: 8 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{
"name": "cron-cluster",
"version": "0.0.1",
"description": "A Cluster plugin for cron using redis",
"description": "A Cluster version of node-cron using redis",
"main": "index.js",
"directories": {
"test": "test"
},
"scripts": {
"test": "tap test/*.js | faucet"
"test": "standard {lib,test}/*.js && tape test/*.js | faucet",
"watch-test": "onchange 'lib/*.js' 'test/*.js' -- npm test"
},
"author": "Andy Vanbutsele <[email protected]>",
"license": "ISC",
Expand All @@ -17,7 +18,11 @@
"redis-leader": "^0.1.0"
},
"devDependencies": {
"async": "^1.4.2",
"faucet": "0.0.1",
"tap": "^1.4.0"
"onchange": "^2.0.0",
"redis": "^1.0.0",
"standard": "^5.2.1",
"tape": "^4.2.0"
}
}

0 comments on commit 903a94f

Please sign in to comment.