#!/bin/bash

source ../dmp_env.sh

today=${ScheduleTime:-$1}

start_time=$(date +"%Y-%m-%d %H:00:00" -d "-6 hours $today")
end_time=$(date +"%Y-%m-%d %H:59:59" -d "+2 hours $today")

java -cp ../${JAR} mobvista.dmp.datasource.rtdmp.Estimate "${start_time}" "${end_time}"

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