-S [num] set the number of max simultanious jobs of the server.
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 "$@" > "$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