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
.
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
.
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.
See do.sh for an example.
#!/usr/bin/env bash
printf "processing task %s" "$1"
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