Skip to content

Commit

Permalink
add analyst estimate cron job
Browse files Browse the repository at this point in the history
  • Loading branch information
MuslemRahimi committed Jun 1, 2024
1 parent 0e1eccf commit d09830d
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions app/primary_cron_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,17 @@ def run_cron_var():
]
subprocess.run(command)

def run_analyst_estimate():
week = datetime.today().weekday()
if week <= 5:
subprocess.run(["python3", "cron_analyst_estimate.py"])
command = [
"sudo", "rsync", "-avz", "-e", "ssh",
"/root/backend/app/json/analyst-estimate",
f"root@{useast_ip_address}:/root/backend/app/json"
]
subprocess.run(command)

def run_cron_market_movers():
week = datetime.today().weekday()
if week <= 4:
Expand Down Expand Up @@ -250,6 +261,7 @@ def run_threaded(job_func):
schedule.every().day.at("09:00").do(run_threaded, run_congress_trading).tag('congress_job')

schedule.every().day.at("13:30").do(run_threaded, run_stockdeck).tag('stockdeck_job')
schedule.every().day.at("13:40").do(run_threaded, run_analyst_estimate).tag('analyst_estimate_job')
schedule.every().day.at("13:45").do(run_threaded, run_similar_stocks).tag('similar_stocks_job')
schedule.every().day.at("14:00").do(run_threaded, run_cron_var).tag('var_job')

Expand Down

0 comments on commit d09830d

Please sign in to comment.