Skip to content

Latest commit

 

History

History
81 lines (64 loc) · 1.38 KB

README.md

File metadata and controls

81 lines (64 loc) · 1.38 KB

CLI

Installation

Install tm by running following command:

go install github.com/yule-l/tm/cmd/tm@latest

and ensuring that $GOPATH/bin is added to your $PATH.

Usage

Just run

tm do --input tasks.txt --script ./do.sh --parallel --force

And task manager will get your tasks and put then one by one into ./do.sh as first argument. You can read more about flags in the help tm do --help.

Tutorial

First step, prepare your tasks file

See tasks.txt for an example.

first
second
third
fourth
fifth
sixth
seventh
eighth
ninth
tenth
eleventh
twelfth
thirteenth
fourteenth
fifteenth

One line will be used as a first argument for the script.

Second step, prepare your script

See do.sh for an example.

#!/usr/bin/env bash

printf "processing task %s" "$1"

Third step, run tm

By default tm do will run your tasks from in parallel, it will use file tasks.txt as input and will use do.sh as script.

tm do

expected output:

processing task fifth
processing task second
processing task fourth
processing task third
processing task first
processing task sixth
processing task eighth
processing task ninth
processing task tenth
processing task seventh
processing task eleventh
processing task twelfth
processing task fourteenth
processing task thirteenth
processing task fifteenth