Answer the question
In order to leave comments, you need to log in
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
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.
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.
Bicycle:
Preparation:
groupadd jobadd
mkdir -m770 /var/lib/jobqueue
chown root:jobadd /var/lib/jobqueue
#!/bin/sh
f=`/var/lib/jobqueue/date +%Y.%m.%d-%H%M%S-$$`
echo "[email protected]" > "$f"
#!/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 questionAsk a Question
731 491 924 answers to any question