Table of Contents
Taskmaster is a lightweight process control manager written in Golang, similar to systemd or supervisor
The only prerequisite dependency is Golang.
- Clone the repo
git clone https://github.com/travmatth/taskmaster.git
- Install Go packages
go install
- Compile program:
go build -o taskmaster Main.go
Usage: ./taskmaster <Config_File> <Log_File> [Log_Level]
Config_File: Procfile you wish to run
Log_File: Log file you wish to use
Log_Level: 0 CRITICAL, 1 ERROR, 2 WARNING, 3 NOTICE, 4 INFO, 5 DEBUG
Taskmaster accepts a config file containing a list of processes to start, along with the options managing their execution and termination. Provides a simple UI to manage processes.
- id: an ID to identify the process, must be unique
command: [int] command & options to be executed
instances: [int] number of instances to launch
atLaunch: [bool=true] [default=true] whether to launch at startup
restartPolicy: [always|unexpected|never] whether to restart instances always|never|unexpected exit
expectedExit: [int] the expected exit code
startCheckup: [int] time in seconds to wait before checking if the process started successfully
maxRestarts: [int] the maximum number of times to attempt restart if failed
stopSignal: [string] signal to be sent to process to kill (name in `man signal`)
stopTimeout: [int] time in seconds to wait after sending stop signal before manually killing the process
redirections:
stdin: [string] file to redirect stdin
stdout: [string] file to redirect stdout
stderr: [string] file to redirect stderr
envVars: [string] "name=val name2=val2" variables to provide to the process environment
workingDir: [string] a path to set as the current working directory
umask: [int] umask to set the process permissions
- id: ID of next process to run
ps: List current jobs being managed
logs: display jobs logs
clear: clear the screen
start [id]: start given job
stop [id]: stop given job
startAll: start all jobs
stopAll: stop all jobs
reload: reload the configuration file
exit: stop all jobs and exit taskmaster
See the open issues for a list of proposed features (and known issues).
go test taskmaster_test.go
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE
for more information.
Travis Matthews
Project Link: https://github.com/travmatth/taskmaster