Git Product home page Git Product logo

yastq's Introduction

Yet another the simplest tasks queue

  1. the simplest task queue written on bash
  2. every task is a bash command
  3. tasks run in a parallel mode (you could hardcode quantity of parallel tasks or select it automatically with cores quantity)
  4. it is possible to add success (exit code 0) and fail (exit code not 0) handlers for every task
  5. it is possible to remove not started tasks

Installation

  1. cd yastq
  2. chmod u+rwX . -R && chmod g-rwx . -R && chmod o-rwx . -R
  3. chmod u+x dashboard.sh tasksqueue.sh worker.sh
  4. copy yastq.conf.sample to ~/.yastq.conf or to /etc/yastq.conf

Using

./dashboard.sh and see usage

Examples

Starting

./dashboard.sh start

Adding tasks

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"

Checking status

./dashboard.sh status

Stopping

./dashboard.sh stop

yastq's People

Stargazers

Arena Artoon avatar Victor avatar Roman Salin avatar Kirill avatar Pavel Patrin avatar

Watchers

James Cloos avatar Pavel Patrin avatar

yastq's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.