diff --git a/dabo/fetch-ohlcv-candles-indicators.sh b/dabo/fetch-ohlcv-candles-indicators.sh index 9136356..e65eb02 100755 --- a/dabo/fetch-ohlcv-candles-indicators.sh +++ b/dabo/fetch-ohlcv-candles-indicators.sh @@ -31,16 +31,20 @@ do # Reload Config . ../../dabo-bot.conf . ../../dabo-bot.override.conf - # notify failed yahoo downloads - [ "$interval" = "1d" ] && cat FAILED_YAHOO/*USD_* FAILED_YAHOO/*ECONOMY* 2>/dev/null | notify.sh -s "Failed Yahoo downloads" + # notify failed downloads + [ "$interval" = "1d" ] && cat FAILED_*/* 2>/dev/null | notify.sh -s "Failed downloads" # Timestamp export f_timestamp=$(g_date_print) # get candles and indicators get_ohlcv-candles $interval [ -n "$seconds" ] && sleeptime=$(( ( ($seconds - $(TZ=UTC printf "%(%s)T") % $seconds) % $seconds + 2 ))) #[[ $interval = 4h ]] && sleeptime=?? - [ "$interval" = "1d" ] && sleeptime=$(($(TZ=UTC date +%s -d "tomorrow 0:00") - $(date +%s) +2 )) - [ "$interval" = "1w" ] && sleeptime=$(($(TZ=UTC date +%s -d "next monday 0:00") - $(date +%s) +2 )) + if [ "$interval" = "1d" ] + 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" sleep $sleeptime done