fix cron job
This commit is contained in:
parent
7e43b3b98d
commit
e56c0eb23e
@ -85,6 +85,7 @@ def prepare_data(data, symbol, directory_path, sort_by = "date"):
|
|||||||
|
|
||||||
|
|
||||||
def get_overview_data():
|
def get_overview_data():
|
||||||
|
print("Starting to download overview data...")
|
||||||
directory_path = "json/gex-dex/overview"
|
directory_path = "json/gex-dex/overview"
|
||||||
total_symbols = get_tickers_from_directory(directory_path)
|
total_symbols = get_tickers_from_directory(directory_path)
|
||||||
if len(total_symbols) < 100:
|
if len(total_symbols) < 100:
|
||||||
@ -115,6 +116,7 @@ def get_overview_data():
|
|||||||
|
|
||||||
|
|
||||||
def get_strike_data():
|
def get_strike_data():
|
||||||
|
print("Starting to download strike data...")
|
||||||
directory_path = "json/gex-dex/strike"
|
directory_path = "json/gex-dex/strike"
|
||||||
total_symbols = get_tickers_from_directory(directory_path)
|
total_symbols = get_tickers_from_directory(directory_path)
|
||||||
if len(total_symbols) < 100:
|
if len(total_symbols) < 100:
|
||||||
@ -143,6 +145,7 @@ def get_strike_data():
|
|||||||
print(f"Error for {symbol}:{e}")
|
print(f"Error for {symbol}:{e}")
|
||||||
|
|
||||||
def get_expiry_data():
|
def get_expiry_data():
|
||||||
|
print("Starting to download expiry data...")
|
||||||
directory_path = "json/gex-dex/expiry"
|
directory_path = "json/gex-dex/expiry"
|
||||||
total_symbols = get_tickers_from_directory(directory_path)
|
total_symbols = get_tickers_from_directory(directory_path)
|
||||||
if len(total_symbols) < 100:
|
if len(total_symbols) < 100:
|
||||||
@ -172,7 +175,7 @@ def get_expiry_data():
|
|||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
#get_overview_data()
|
get_overview_data()
|
||||||
get_strike_data()
|
get_strike_data()
|
||||||
get_expiry_data()
|
get_expiry_data()
|
||||||
|
|
||||||
|
|||||||
@ -68,7 +68,9 @@ def run_dark_pool_flow():
|
|||||||
def run_market_flow():
|
def run_market_flow():
|
||||||
now = datetime.now(ny_tz)
|
now = datetime.now(ny_tz)
|
||||||
week = now.weekday()
|
week = now.weekday()
|
||||||
if week <= 4:
|
current_time = now.time()
|
||||||
|
hour = now.hour
|
||||||
|
if week <= 4 and 9 < hour < 20:
|
||||||
run_command(["python3", "cron_market_flow.py"])
|
run_command(["python3", "cron_market_flow.py"])
|
||||||
|
|
||||||
def run_dark_pool_level():
|
def run_dark_pool_level():
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user