Skip to content

Commit

Permalink
add executive and sec filings cron jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
MuslemRahimi committed Jun 13, 2024
1 parent 9010c1c commit 660109d
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions app/primary_cron_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,21 @@ def run_one_day_price():
command = ["sudo", "rsync", "-avz", "-e", "ssh", "/root/backend/app/json/one-day-price/", f"root@{useast_ip_address}:/root/backend/app/json/one-day-price/"]
subprocess.run(command)

def run_sec_filings():
week = datetime.today().weekday()
if week <= 4:
subprocess.run(["python3", "cron_sec_filings.py"])
command = ["sudo", "rsync", "-avz", "-e", "ssh", "/root/backend/app/json/sec-filings", f"root@{useast_ip_address}:/root/backend/app/json"]
subprocess.run(command)

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


def run_options_bubble_ticker():
week = datetime.today().weekday()
if week <= 4:
Expand Down Expand Up @@ -283,6 +298,9 @@ def run_threaded(job_func):
schedule.every().day.at("09:00").do(run_threaded, run_congress_trading).tag('congress_job')
schedule.every().day.at("10:00").do(run_threaded, run_shareholders).tag('shareholders_job')
schedule.every().day.at("10:15").do(run_threaded, run_share_statistics).tag('share_statistics_job')
schedule.every().day.at("10:30").do(run_threaded, run_sec_filings).tag('sec_filings_job')
schedule.every().day.at("11:00").do(run_threaded, run_executive).tag('executive_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')
Expand Down

0 comments on commit 660109d

Please sign in to comment.