#!/bin/sh #Will restart the process script if not running #Wait 10 seconds for the sync to finish #Check for the cron.process.pending.cfds.new.php PHPBIN=/usr/bin/php SCRIPT_PATH='/d1/asxsmg/public_html/cron/' SCRIPT='cron.process.pending.cfds.new.php'; CHARS='ABCDEFGHIJKLM NOPQRSTUVWXYZ' for i in $CHARS; do if ps ax | egrep -v "grep|vi|nano" | grep "$SCRIPT_PATH$SCRIPT -c$i" > /dev/null then echo "running - $PHPBIN \"$SCRIPT_PATH$SCRIPT -c$i\"" else #sleep 10 $PHPBIN "$SCRIPT_PATH$SCRIPT -c$i" & > /dev/null 2>&1 fi done