@lusc/cli-interval
v6.0.0
Published
Run a command at a given interval, and aggregate its output
Readme
interval
Repeat a command at a given interval, and aggregate its output.
npm install -g @lusc/cli-intervalThe following example outputs "Hello" to stdout every second.
$ interval -t 1s "echo Hello"
Hello
Hello
# ...The command can also be passed as multiple arguments.
interval -t 1s "node index.js"
# same as
interval -t 1s "node" "index.js"It aggregates both stdout and stderr over time, and pipes them into its respective outputs.
It waits for the command to finish, waits the specified delay and runs the command again.
Arguments
-h,--helpprint the command usage and exit-v,--versionprint the version and exit-t,--intervalspecify the interval at which to run the command, e.g.-t 100every 100 milliseconds-t 5severy 5 seconds-t 2mevery 2 minutes-t 1hevery hour- Accepts any value that ms can parse.
This is a fork of Tabcorp/cli-interval.
