]> git.netwichtig.de Git - user/henk/code/snooze.git/commitdiff
README.md: rate-limiting example
authorChristian Neukirchen <chneukirchen@gmail.com>
Fri, 6 Nov 2015 16:01:52 +0000 (17:01 +0100)
committerChristian Neukirchen <chneukirchen@gmail.com>
Fri, 6 Nov 2015 16:01:52 +0000 (17:01 +0100)
README.md

index d33c953bedd7ba6365f351f7b6df26ad649fef8d..9d10153dacefd4663bfff4e4f0ce9d084e5fb4da 100644 (file)
--- a/README.md
+++ b/README.md
@@ -160,6 +160,16 @@ Use snooze inline, cron-style mail:
        actualjob >output 2>&1 ||
                mail -s "$(hostname): snooze job failed with status $?" root <output
 
+Snooze for rate-limiting a general purpose runit service: don't
+restart faster than every two minutes. (Note that after a crash with a
+daemon runtime of more than two minutes, it will be restarted
+immediately):
+
+       set -e
+       snooze -H'*' -M'*' -S'*' -t timefile -T 2m
+       touch timefile
+       exec mydaemond
+
 ## Installation
 
 Use `make all` to build, `make install` to install relative to `PREFIX`