update cron job
This commit is contained in:
parent
e56c0eb23e
commit
375a816f74
@ -7,10 +7,6 @@ import os
|
||||
import sqlite3
|
||||
import time
|
||||
from tqdm import tqdm
|
||||
from concurrent.futures import ThreadPoolExecutor
|
||||
from functools import partial
|
||||
import asyncio
|
||||
import aiohttp
|
||||
|
||||
load_dotenv()
|
||||
|
||||
@ -92,7 +88,8 @@ def get_overview_data():
|
||||
total_symbols = stocks_symbols+etf_symbols
|
||||
|
||||
counter = 0
|
||||
total_symbols = ['GME']
|
||||
#Test mode
|
||||
#total_symbols = ['GME','SPY']
|
||||
for symbol in tqdm(total_symbols):
|
||||
try:
|
||||
url = f"https://api.unusualwhales.com/api/stock/{symbol}/greek-exposure"
|
||||
@ -123,7 +120,8 @@ def get_strike_data():
|
||||
total_symbols = stocks_symbols+etf_symbols
|
||||
|
||||
counter = 0
|
||||
total_symbols = ['GME']
|
||||
#Test mode
|
||||
#total_symbols = ['GME','SPY']
|
||||
for symbol in tqdm(total_symbols):
|
||||
try:
|
||||
url = f"https://api.unusualwhales.com/api/stock/{symbol}/greek-exposure/strike"
|
||||
@ -152,7 +150,8 @@ def get_expiry_data():
|
||||
total_symbols = stocks_symbols+etf_symbols
|
||||
|
||||
counter = 0
|
||||
total_symbols = ['GME']
|
||||
#total_symbols = ['GME','SPY']
|
||||
#total_symbols = ['GME','SPY']
|
||||
for symbol in tqdm(total_symbols):
|
||||
try:
|
||||
url = f"https://api.unusualwhales.com/api/stock/{symbol}/greek-exposure/expiry"
|
||||
@ -176,6 +175,8 @@ def get_expiry_data():
|
||||
|
||||
if __name__ == '__main__':
|
||||
get_overview_data()
|
||||
time.sleep(60)
|
||||
get_strike_data()
|
||||
time.sleep(60)
|
||||
get_expiry_data()
|
||||
|
||||
|
||||
@ -91,6 +91,8 @@ def run_options_jobs():
|
||||
now = datetime.now(ny_tz)
|
||||
week = now.weekday()
|
||||
if week <= 5:
|
||||
run_command(["python3", "cron_options_gex_dex.py"])
|
||||
time.sleep(60)
|
||||
run_command(["python3", "cron_options_stats.py"])
|
||||
time.sleep(60)
|
||||
run_command(["python3", "cron_options_historical_volume.py"])
|
||||
@ -342,7 +344,7 @@ def run_threaded(job_func):
|
||||
|
||||
# Schedule the job to run
|
||||
|
||||
schedule.every().day.at("03:00").do(run_threaded, run_options_jobs).tag('options_job')
|
||||
schedule.every().day.at("00: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')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user