F
F
facha2013-06-28 12:23:36
linux
facha, 2013-06-28 12:23:36

Task Queue

Hello.

There was a need for software for linux that implements a task queue. Is there anything not too heavy?

Here's how I imagine it. Several processes add tasks to the queue. These tasks are performed in the order they were added. Until the previous task is completed, the next one is not started.

If it suddenly turns out that this type of software is in bulk, tell me something that is in the CentOS packages.

Thanks in advance.

Answer the question

In order to leave comments, you need to log in

6 answer(s)
I
Ilya Evseev, 2013-06-28
@IlyaEvseev

A Google search for "linux simple jobs queue" finds the Task Spooler:
www.ubuntugeek.com/task-spooler-personal-job-scheduler.html

-S [num] set the number of max simultanious jobs of the server.

S
script88, 2013-06-28
@script88

habrahabr.ru/company/biggo/blog/102742/

P
PaulOkopny, 2013-06-28
@PaulOkopny

www.celeryproject.org/
www.gearman.org/

V
Vladimir Sokolovsky, 2013-06-28
@inlanger

There is a very simple task queue for python - python-rq.org/
And with python you can run console commands, programs, scripts, etc.
If you want even easier - write your own on the crown, files and bash.

J
joneleth, 2013-06-28
@joneleth

How heavy is it? Jenkins?

I
Ilya Evseev, 2013-06-29
@IlyaEvseev

Bicycle:
Preparation:

groupadd jobadd
mkdir -m770 /var/lib/jobqueue
chown root:jobadd /var/lib/jobqueue

/usr/local/bin/jobadd:
#!/bin/sh
f=`/var/lib/jobqueue/date +%Y.%m.%d-%H%M%S-$$`
echo "[email protected]" > "$f"

/usr/local/sbin/jobexec:
#!/bin/sh
cd /var/lib/jobqueue
while : ; do
    for f in *-*-*; do
        test "$f" = "*-*-*" && break
        logger "jobexec: $f `cat $f`"
        sh "$f"
        rm "$f"
    done
    sleep 30
done

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question