if [[ $# -ne 2  ]];then
    echo 'Usage:'$0' <startdate> <enddate>'
    exit
fi
startdate=`date -d "$1" +%Y-%m-%d`
enddate=`date -d "$2" +%Y-%m-%d`

while [[ $startdate < $enddate]]
do
    /opt/spark/bin/spark-submit --master spark://10.31.242.83:7077  --total-executor-cores 20 --executor-memory 3g  --executor-cores 2 --driver-memory 8g --conf spark.default.parallelism=200  --conf spark.storage.memoryFraction=0.5 --conf spark.shuffle.memoryFraction=0.3 --class com.gmei.jerry.strategy_clk_imp_oldUser /srv/apps/ffm-baseline/eda/feededa/target/scala-2.11/feededa-assembly-0.1.jar --env prod --date $startdate >>ctr1.log
    startdate=`date -d "+1 day $startdate" +%Y-%m-%d`
done
