https://github.com/kcmerrill/kj
Nohup. But with a little extra.
https://github.com/kcmerrill/kj
background nohup process supervisor
Last synced: 2 months ago
JSON representation
Nohup. But with a little extra.
- Host: GitHub
- URL: https://github.com/kcmerrill/kj
- Owner: kcmerrill
- Created: 2017-04-10T23:05:28.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-08-29T14:59:01.000Z (almost 8 years ago)
- Last Synced: 2025-04-14T23:55:53.140Z (2 months ago)
- Topics: background, nohup, process, supervisor
- Language: Go
- Homepage:
- Size: 163 KB
- Stars: 3
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# King Julien
Nohup. But with a little extra.
[](https://travis-ci.org/kcmerrill/kj) [](https://gitter.im/kcmerrill/kj?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

## Binaries || Installation
[](http://go-dist.kcmerrill.com/kcmerrill/kj/mac/amd64) [](http://go-dist.kcmerrill.com/kcmerrill/kj/linux/amd64)
via go:
`$ go get -u github.com/kcmerrill/kj`
## About
`kj` is a simple process manager that keeps a single(or multiple) processes working. The idea being, you can keep a process running while you're away at lunch. If you need something more sophisticated I'd recommend using `supervisord`. `kj` is small and lightweight and should be treated as such.
* keep a process running
* keep X number of processes running
* automatically shove processes to the background
* keep logs of stdin/stdout
* log reaping based on log size# Demo
[](https://asciinema.org/a/135248)
## Usage
The most basic usage is simply to run `kj echo hello world` where `echo hello world` is the command you want to run. It will spawn the process off in the background, and make sure it can't be interrupted by the hangup signal.
`kj --id="name.of.log.file.essentially" --workers=10 --run-once `
The above example will store your logs in a file called `name.of.log.file.essentially`. By default, `kj` will attempt to keep your process running by restarting it. `--run-once` flag will only let the process run once and then kj will exit out when the process completes.