#!/bin/sh

Log=./bot_trade_log.out

while [ 1 ] 
do
  Cnt=`ps -ex|grep "bot_trade"|grep -v grep|wc -l`
  DATE=`date +%Y%m%d-%H%M%S`
 if [ $Cnt \< 1 ]
  then
echo "$DATE : run" >> $Log
else
echo "$DATE : exe" >> $Log
    CMD=`../../../bot_trade` 
fi
  sleep 60
done