From b1d75c52ab3864b3bc50d72a2c1c13285957c368 Mon Sep 17 00:00:00 2001 From: MuslemRahimi Date: Tue, 7 Jan 2025 10:54:26 +0100 Subject: [PATCH] bugfixing for cron jobs --- app/cron_options_single_contract.py | 2 +- app/primary_cron_job.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/cron_options_single_contract.py b/app/cron_options_single_contract.py index 3096de2..a52096f 100644 --- a/app/cron_options_single_contract.py +++ b/app/cron_options_single_contract.py @@ -96,7 +96,7 @@ def get_single_contract_historical_data(contract_id): contract_id_set.add(item['option_symbol']) # Add to the set except KeyError: pass # Handle missing 'option_symbol' keys gracefully - except FileNotFoundError: + except: pass # Handle missing files gracefully # Convert the set to a list if needed diff --git a/app/primary_cron_job.py b/app/primary_cron_job.py index 7630073..58b1292 100755 --- a/app/primary_cron_job.py +++ b/app/primary_cron_job.py @@ -340,8 +340,8 @@ def run_threaded(job_func): # Schedule the job to run -schedule.every().day.at("01:00").do(run_threaded, run_options_jobs).tag('options_job') -schedule.every().day.at("02:00").do(run_threaded, run_db_schedule_job) +schedule.every().day.at("03:00").do(run_threaded, run_options_jobs).tag('options_job') +schedule.every().day.at("01: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_export_price).tag('export_price_job')