Yet another the simplest tasks queue
the simplest task queue written on bash
every task is a bash command
tasks run in a parallel mode (you could hardcode quantity of parallel tasks or select it automatically with cores quantity)
it is possible to add success (exit code 0) and fail (exit code not 0) handlers for every task
it is possible to remove not started tasks
cd yastq
chmod u+rwX . -R && chmod g-rwx . -R && chmod o-rwx . -R
chmod u+x dashboard.sh tasksqueue.sh worker.sh
copy yastq.conf.sample to ~/.yastq.conf or to /etc/yastq.conf
./dashboard.sh and see usage
Simple adding of a new task
./dashboard.sh add-task \
task " /bin/sleep 5s && /bin/echo Hello, $( id -un) | /usr/bin/write $( id -un) "
Adding of a new task with status handlers
./dashboard.sh add-task \
task " /bin/sleep 5s && /bin/echo Hello again, $( id -un) | /usr/bin/write $( id -un) " \
success " echo Ok > /tmp/queuetest" \
fail " echo Fail > /tmp/queuetest"
./dashboard.sh add-task \
task " /bin/sleep 5s && /bin/echo Hello again, $( id -un) \!\!\! | /usr/bin/write $( id -un) && /bin/false" \
success " echo Ok > /tmp/queuetest" \
fail " echo Fail > /tmp/queuetest"