From 36a19da7e0cd6a8824238369ffe9ca8a12406f0f Mon Sep 17 00:00:00 2001 From: Mathias Buus Date: Mon, 18 May 2015 20:41:20 +0200 Subject: [PATCH] not on max restarts being changed --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index ba9dc8e..b56472d 100644 --- a/README.md +++ b/README.md @@ -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.