From 75241ba448e1ca33ac33f4c83bbaad25626e23d0 Mon Sep 17 00:00:00 2001 From: MuslemRahimi Date: Sun, 12 Jan 2025 16:33:29 +0100 Subject: [PATCH] update cron job --- app/cron_options_historical_volume.py | 1 + app/primary_cron_job.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/cron_options_historical_volume.py b/app/cron_options_historical_volume.py index bd52488..6c8cc3f 100644 --- a/app/cron_options_historical_volume.py +++ b/app/cron_options_historical_volume.py @@ -62,6 +62,7 @@ if len(total_symbols) < 100: print(len(total_symbols)) + def save_json(data, symbol): os.makedirs(directory_path, exist_ok=True) # Ensure the directory exists with open(f"{directory_path}/{symbol}.json", 'wb') as file: # Use binary mode for orjson diff --git a/app/primary_cron_job.py b/app/primary_cron_job.py index 3ae8401..eaddc7d 100755 --- a/app/primary_cron_job.py +++ b/app/primary_cron_job.py @@ -97,11 +97,11 @@ def run_options_jobs(): time.sleep(60) run_command(["python3", "cron_options_stats.py"]) time.sleep(60) + run_command(["python3", "cron_options_historical_volume.py"]) + time.sleep(60) run_command(["python3", "cron_options_hottest_contracts.py"]) time.sleep(60) run_command(["python3", "cron_options_single_contract.py"]) - time.sleep(60) - run_command(["python3", "cron_options_historical_volume.py"]) def run_fda_calendar(): now = datetime.now(ny_tz)