update cron job

This commit is contained in:
MuslemRahimi 2024-12-31 00:25:02 +01:00
parent a069f1f985
commit 53644a5744
3 changed files with 10 additions and 5 deletions

View File

@ -93,9 +93,7 @@ chunk_counter = 0 # To keep track of how many chunks have been processed
for chunk in chunks: for chunk in chunks:
try: try:
chunk_str = ",".join(chunk) chunk_str = ",".join(chunk)
print(chunk_str)
url = "https://api.unusualwhales.com/api/screener/stocks" url = "https://api.unusualwhales.com/api/screener/stocks"
querystring = {"ticker": chunk_str} querystring = {"ticker": chunk_str}

View File

@ -85,6 +85,12 @@ def run_dark_pool_ticker():
run_command(["python3", "cron_dark_pool_ticker.py"]) run_command(["python3", "cron_dark_pool_ticker.py"])
def run_options_stats():
now = datetime.now(ny_tz)
week = now.weekday()
if week <= 5:
run_command(["python3", "cron_options_stats.py"])
def run_fda_calendar(): def run_fda_calendar():
now = datetime.now(ny_tz) now = datetime.now(ny_tz)
week = now.weekday() week = now.weekday()
@ -348,6 +354,9 @@ schedule.every().day.at("02:00").do(run_threaded, run_db_schedule_job)
schedule.every().day.at("05:00").do(run_threaded, run_options_gex).tag('options_gex_job') schedule.every().day.at("05:00").do(run_threaded, run_options_gex).tag('options_gex_job')
schedule.every().day.at("05:00").do(run_threaded, run_export_price).tag('export_price_job') schedule.every().day.at("05:00").do(run_threaded, run_export_price).tag('export_price_job')
schedule.every().day.at("05:30").do(run_threaded, run_options_stats).tag('options_stats_job')
schedule.every().day.at("06:00").do(run_threaded, run_historical_price).tag('historical_job') schedule.every().day.at("06:00").do(run_threaded, run_historical_price).tag('historical_job')
schedule.every().day.at("06:30").do(run_threaded, run_ai_score).tag('ai_score_job') schedule.every().day.at("06:30").do(run_threaded, run_ai_score).tag('ai_score_job')

View File

@ -975,8 +975,6 @@ async def get_stock_screener(con):
item['netIncomeGrowthYears'] = None item['netIncomeGrowthYears'] = None
item['grossProfitGrowthYears'] = None item['grossProfitGrowthYears'] = None
for item in stock_screener_data: for item in stock_screener_data:
for key, value in item.items(): for key, value in item.items():
if isinstance(value, float): if isinstance(value, float):