update cron job

This commit is contained in:
MuslemRahimi 2024-10-23 20:09:20 +02:00
parent 0d10ee388c
commit c58fafe734
3 changed files with 10 additions and 2 deletions

View File

@ -119,7 +119,7 @@ async def run():
# List of total symbols to process
total_symbols = stock_symbols # Use stock_symbols + etf_symbols if needed
chunk_size = len(total_symbols) // 500 # Divide the list into N chunks
chunk_size = len(total_symbols) #// 500 # Divide the list into N chunks
chunks = [total_symbols[i:i + chunk_size] for i in range(0, len(total_symbols), chunk_size)]
for chunk in tqdm(chunks):

View File

@ -248,6 +248,12 @@ def run_dashboard():
run_command(["python3", "cron_market_movers.py"])
run_command(["python3", "cron_dashboard.py"])
def run_export_price():
week = datetime.today().weekday()
if week <= 5:
run_command(["python3", "cron_export_price"])
def run_tracker():
# Run Python scripts
scripts = [
@ -313,6 +319,8 @@ schedule.every().day.at("01:00").do(run_threaded, run_options_bubble_ticker).tag
schedule.every().day.at("02:00").do(run_threaded, run_db_schedule_job)
schedule.every().day.at("03:00").do(run_threaded, run_dark_pool)
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("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')

View File

@ -51,7 +51,7 @@ def run_threaded(job_func):
job_thread.start()
schedule.every().day.at("06:30").do(run_threaded, run_pocketbase).tag('pocketbase_job')
#schedule.every().day.at("06:30").do(run_threaded, run_pocketbase).tag('pocketbase_job')
schedule.every().day.at("15:45").do(run_threaded, run_restart_cache)
schedule.every(2).hours.do(run_threaded, run_json_job).tag('json_job')
schedule.every(1).minutes.do(run_threaded, run_cron_price_alert).tag('price_alert_job')