day fetches 1 minute later
This commit is contained in:
parent
c0a3e85888
commit
edfa828c2a
@ -31,16 +31,20 @@ do
|
|||||||
# Reload Config
|
# Reload Config
|
||||||
. ../../dabo-bot.conf
|
. ../../dabo-bot.conf
|
||||||
. ../../dabo-bot.override.conf
|
. ../../dabo-bot.override.conf
|
||||||
# notify failed yahoo downloads
|
# notify failed downloads
|
||||||
[ "$interval" = "1d" ] && cat FAILED_YAHOO/*USD_* FAILED_YAHOO/*ECONOMY* 2>/dev/null | notify.sh -s "Failed Yahoo downloads"
|
[ "$interval" = "1d" ] && cat FAILED_*/* 2>/dev/null | notify.sh -s "Failed downloads"
|
||||||
# Timestamp
|
# Timestamp
|
||||||
export f_timestamp=$(g_date_print)
|
export f_timestamp=$(g_date_print)
|
||||||
# get candles and indicators
|
# get candles and indicators
|
||||||
get_ohlcv-candles $interval
|
get_ohlcv-candles $interval
|
||||||
[ -n "$seconds" ] && sleeptime=$(( ( ($seconds - $(TZ=UTC printf "%(%s)T") % $seconds) % $seconds + 2 )))
|
[ -n "$seconds" ] && sleeptime=$(( ( ($seconds - $(TZ=UTC printf "%(%s)T") % $seconds) % $seconds + 2 )))
|
||||||
#[[ $interval = 4h ]] && sleeptime=??
|
#[[ $interval = 4h ]] && sleeptime=??
|
||||||
[ "$interval" = "1d" ] && sleeptime=$(($(TZ=UTC date +%s -d "tomorrow 0:00") - $(date +%s) +2 ))
|
if [ "$interval" = "1d" ]
|
||||||
[ "$interval" = "1w" ] && sleeptime=$(($(TZ=UTC date +%s -d "next monday 0:00") - $(date +%s) +2 ))
|
then
|
||||||
|
get_marketdata_fear_and_greed_alternativeme
|
||||||
|
sleeptime=$(($(TZ=UTC date +%s -d "tomorrow 0:01") - $(date +%s) +2 ))
|
||||||
|
fi
|
||||||
|
[ "$interval" = "1w" ] && sleeptime=$(($(TZ=UTC date +%s -d "next monday 0:01") - $(date +%s) +2 ))
|
||||||
g_echo_note "Waiting $sleeptime seconds until next run"
|
g_echo_note "Waiting $sleeptime seconds until next run"
|
||||||
sleep $sleeptime
|
sleep $sleeptime
|
||||||
done
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user