Skip to content

Commit

Permalink
not on max restarts being changed
Browse files Browse the repository at this point in the history
  • Loading branch information
mafintosh committed May 18, 2015
1 parent 8747367 commit 36a19da
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ monitor.start() // spawn and watch

Optionally you can specify the command to to spawn in the option map as `command: [...]`

Per default respawn will restart you app indefinitely. To set a max restart limit set the `maxRestarts` option.

If `sleep` is an array of numbers it will use the value at the position of the current number of restarts as the timeout value. If the number of restarts exceed the length of the array it will use the last value in the array until it hits the maxRestarts.

`sleep: [1000, 60000, 60000, 12000, 1000]` will wait 1000ms before retrying, then it will wait 60000 before the next retry and so forth.
Expand Down

0 comments on commit 36a19da

Please sign in to comment.