From 0aed6077f976b5587519e8c135e3390e01b46240 Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Tue, 5 Apr 2011 19:14:43 +0200 Subject: [PATCH 1/1] start poll_prefix from cron This first checks if there is poll_prefix queued already and exit 1 if it does --- cron.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 cron.sh diff --git a/cron.sh b/cron.sh new file mode 100755 index 0000000..dd695e6 --- /dev/null +++ b/cron.sh @@ -0,0 +1,10 @@ +#!/bin/bash -x + +running=`echo status | nc -w 1 localhost 4730 | grep ^poll_prefix | cut -d" " -f2` +if [ "$running" -gt 0 ] ; then + echo "poll allready queued!" + exit 1 +fi + +time echo | gearman -N -f poll_prefix + -- 2.20.1