Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/reddec/runbatch
Run and control multiple executables
https://github.com/reddec/runbatch
administration multirun nodejs runner testing
Last synced: about 1 month ago
JSON representation
Run and control multiple executables
- Host: GitHub
- URL: https://github.com/reddec/runbatch
- Owner: reddec
- License: mit
- Created: 2018-04-22T14:06:38.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-04-23T06:16:26.000Z (over 6 years ago)
- Last Synced: 2024-10-02T21:17:18.273Z (3 months ago)
- Topics: administration, multirun, nodejs, runner, testing
- Language: JavaScript
- Size: 9.77 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Runbatch
Simple utility for run multiple instances of one application with template environment and command line.
Very useful for testing purpose.
Template engine - templayed.js
# Install
npm install -g runbatch
# Usage
## Example 1 (template)
you need to start multiple TCP listeners from 9000 to 9099
runbatch -c 100 -- nc -l '{{index + 9000}}'
## Example 2 (stuck process)
some process will not close after SIGINT close: specify maximum graceful timeout in ms by `-t, --timeout `
runbatch -t 10000 -- app
# wait for 10 seconds after SIGTERM and then send SIGKILL (terminate)## Example 3 (fail fast)
if you need stop every processes after first fail (non-zero code) you can use `-f, --fail-fast` flag
runbatch -f -- nc -l '{{index + 9000}}'
# if at least one nc not bind then every one are closed## Example 4 (dynamic environment)
you can set template environment variable by flag `-e, --env [key=value]`
runbatch -e "NODE_ID={{index}}" -- app