Skip to content

Commit

Permalink
update cron job schedule
Browse files Browse the repository at this point in the history
  • Loading branch information
MuslemRahimi committed Dec 8, 2024
1 parent 23edfb5 commit b361315
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 28 deletions.
6 changes: 3 additions & 3 deletions app/cron_reddit_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,21 +396,21 @@ def post_to_reddit():
post_configs = [
{
"data_type": "penny-stocks",
"title": f"Top 5 Actively Traded Penny Stocks by Volume 🚀 as of today",
"title": f"Top 5 Actively Traded Penny Stocks by Volume 🚀",
"url": "https://stocknear.com/list/penny-stocks",
"info_text": "Penny stocks are generally defined as stocks trading below $5 per share. This list is filtered to show only stocks with a volume over 10K.",
"flair_id": "b348676c-e451-11ee-8572-328509439585"
},
{
"data_type": "overbought-stocks",
"title": f"Top 5 Most Overbought Companies 📉 as of today",
"title": f"Top 5 Most Overbought Companies 📉",
"url": "https://stocknear.com/list/overbought-stocks",
'info_text': "I’ve compiled a list of the top 5 most overbought companies based on RSI (Relative Strength Index) data. For those who don’t know, RSI is a popular indicator that ranges from 0 to 100, with values above 70 typically indicating that a stock is overbought.",
"flair_id": "b348676c-e451-11ee-8572-328509439585"
},
{
"data_type": "oversold-stocks",
"title": f"Top 5 Most Oversold Companies 📈 as of today",
"title": f"Top 5 Most Oversold Companies 📈",
"url": "https://stocknear.com/list/oversold-stocks",
'info_text': "I’ve compiled a list of the top 5 most oversold companies based on RSI (Relative Strength Index) data. For those who don’t know, RSI is a popular indicator that ranges from 0 to 100, with values below 30 typically indicating that a stock is oversold.",
"flair_id": "b348676c-e451-11ee-8572-328509439585"
Expand Down
64 changes: 39 additions & 25 deletions app/primary_cron_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,11 @@ def run_options_bubble_ticker():


def run_analyst_rating():
run_command(["python3", "cron_analyst_insight.py"])
run_command(["python3", "cron_analyst_db.py"])
run_command(["python3", "cron_analyst_ticker.py"])
week = datetime.today().weekday()
if week <= 4:
run_command(["python3", "cron_analyst_insight.py"])
run_command(["python3", "cron_analyst_db.py"])
run_command(["python3", "cron_analyst_ticker.py"])

def run_market_moods():
week = datetime.today().weekday()
Expand Down Expand Up @@ -210,7 +212,9 @@ def run_options_gex():


def run_hedge_fund():
run_command(["python3", "cron_hedge_funds.py"])
week = datetime.today().weekday()
if week <= 4:
run_command(["python3", "cron_hedge_funds.py"])

def run_dashboard():
week = datetime.today().weekday()
Expand All @@ -226,49 +230,59 @@ def run_export_price():
run_command(["python3", "cron_export_price"])

def run_tracker():
# Run Python scripts

scripts = [
"cron_reddit_tracker.py",
"cron_reddit_statistics.py",
"cron_cramer_tracker.py",
"cron_lobbying_tracker.py",
"cron_sentiment_tracker.py",
"cron_insider_tracker.py",
"cron_list.py",
]
for script in scripts:
run_command(["python3", script])

week = datetime.today().weekday()
if week <= 4:
scripts = [
"cron_cramer_tracker.py",
"cron_lobbying_tracker.py",
"cron_sentiment_tracker.py",
"cron_insider_tracker.py",
"cron_list.py",
]
for script in scripts:
run_command(["python3", script])

def run_financial_statements():
run_command(["python3", "cron_financial_statements.py"])
week = datetime.today().weekday()
if week <= 4:
run_command(["python3", "cron_financial_statements.py"])

def run_financial_score():
run_command(["python3", "cron_financial_score.py"])
week = datetime.today().weekday()
if week <= 4:
run_command(["python3", "cron_financial_score.py"])


def run_market_cap():
run_command(["python3", "cron_market_cap.py"])
week = datetime.today().weekday()
if week <= 4:
run_command(["python3", "cron_market_cap.py"])


def run_dividends():
run_command(["python3", "cron_dividends.py"])
week = datetime.today().weekday()
if week <= 4:
run_command(["python3", "cron_dividends.py"])


def run_earnings():
run_command(["python3", "cron_earnings.py"])
week = datetime.today().weekday()
if week <= 4:
run_command(["python3", "cron_earnings.py"])


def run_economy_indicator():
run_command(["python3", "cron_economic_indicator.py"])



def run_sentiment_analysis():
run_command(["python3", "cron_sentiment_analysis.py"])


def run_price_analysis():
run_command(["python3", "cron_price_analysis.py"])
week = datetime.today().weekday()
if week <= 4:
run_command(["python3", "cron_economic_indicator.py"])


def run_ai_score():
Expand Down

0 comments on commit b361315

Please sign in to comment.