#!/bin/bash

# # # # # # # # # # # # # # # # # # # # # #
# @author  :wangjf
# @revision:2019-10-30 14:08:18
# # # # # # # # # # # # # # # # # # # # # #

source ../dmp_env.sh

region=$1
today=${ScheduleTime:-$2}

datetime=$(date +"%Y-%m-%d %H" -d "1 days ago $today")
date=${datetime:0:10}
hour=${datetime:11:2}
java -cp ../${JAR} mobvista.dmp.datasource.realtime.service.RealTimeServiceDropMain ${date} ${hour} ${region}

if [[ $? -ne 0 ]]; then
    exit 255
fi