Skip to content

Travmatth/taskmaster

Repository files navigation

Contributors Forks Stargazers Issues MIT License LinkedIn

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Test
  6. Contributing
  7. License
  8. Contact
  9. Acknowledgements

About The Project

Product Name Screen Shot

Taskmaster is a lightweight process control manager written in Golang, similar to systemd or supervisor

Built With

Getting Started

Prerequisites

The only prerequisite dependency is Golang.

Installation

  1. Clone the repo
    git clone https://github.com/travmatth/taskmaster.git
  2. Install Go packages
    go install
  3. Compile program:
go build -o taskmaster Main.go

Usage

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.

Procfile:

- 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

UI Commands

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

Roadmap

See the open issues for a list of proposed features (and known issues).

Test

go test taskmaster_test.go

Contributing

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.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Travis Matthews

Project Link: https://github.com/travmatth/taskmaster

Acknowledgements

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published