#!/usr/sh

today=${ScheduleTime:-$1}
dateTime=$(date +%Y-%m-%d -d "-1 day $today")

java -jar -Dloader.main=com.mobvista.apptag.utils.GetPackageFromOffer apptag.jar ${dateTime}

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