#!/bin/bash

#获取当前时间，格式是时分，例如当前是上午8：50，hh=850
hh=`date '+%H%M'`
 
#0.10--20.10 执行自动任务
if [ $hh -ge 010 -a $hh -le 2000 ]
then
    echo " Morning -- Automatic breakfast "
for i in `seq 1 2`
do
echo $i
cd /www/wwwroot/34049 && php think action index/Test/test
cd /www/wwwroot/32949.com && php think action index/Test/test
cd /www/wwwroot/34149.com && php think action index/Test/test
cd /www/wwwroot/60749.com && php think action index/Test/test
cd /www/wwwroot/63849.com && php think action index/Test/test
cd /www/wwwroot/69049.com && php think action index/Test/test
cd /www/wwwroot/09149.com && php think action index/Test/test
cd /www/wwwroot/62175.com && php think action index/Test/test
cd /www/wwwroot/62159.com && php think action index/Test/test
sleep 300
done 
 
#22.00--23.59 执行做饭任务
elif [ $hh -ge 2200 -a $hh -le 2359 ]
then
    echo " Lunch time -- Cook "
cd /www/wwwroot/69049.com && php think action index/Test/test
cd /www/wwwroot/09149.com && php think action index/Test/test
cd /www/wwwroot/34049 && php think action index/Test/test
cd /www/wwwroot/32949.com && php think action index/Test/test
cd /www/wwwroot/34149.com && php think action index/Test/test
cd /www/wwwroot/60749.com && php think action index/Test/test
cd /www/wwwroot/63849.com && php think action index/Test/test
cd /www/wwwroot/62175.com && php think action index/Test/test
cd /www/wwwroot/62159.com && php think action index/Test/test
#不适合适的时间，不做什么
else
    echo "$hh Not within time "
 
fi
