update cron job schedule

This commit is contained in:
MuslemRahimi 2024-12-08 12:27:02 +01:00
parent 23edfb537e
commit b36131595b
2 changed files with 42 additions and 28 deletions

View File

@ -396,21 +396,21 @@ def post_to_reddit():
post_configs = [ post_configs = [
{ {
"data_type": "penny-stocks", "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", "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.", "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" "flair_id": "b348676c-e451-11ee-8572-328509439585"
}, },
{ {
"data_type": "overbought-stocks", "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", "url": "https://stocknear.com/list/overbought-stocks",
'info_text': "Ive compiled a list of the top 5 most overbought companies based on RSI (Relative Strength Index) data. For those who dont know, RSI is a popular indicator that ranges from 0 to 100, with values above 70 typically indicating that a stock is overbought.", 'info_text': "Ive compiled a list of the top 5 most overbought companies based on RSI (Relative Strength Index) data. For those who dont 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" "flair_id": "b348676c-e451-11ee-8572-328509439585"
}, },
{ {
"data_type": "oversold-stocks", "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", "url": "https://stocknear.com/list/oversold-stocks",
'info_text': "Ive compiled a list of the top 5 most oversold companies based on RSI (Relative Strength Index) data. For those who dont know, RSI is a popular indicator that ranges from 0 to 100, with values below 30 typically indicating that a stock is oversold.", 'info_text': "Ive compiled a list of the top 5 most oversold companies based on RSI (Relative Strength Index) data. For those who dont 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" "flair_id": "b348676c-e451-11ee-8572-328509439585"

View File

@ -172,9 +172,11 @@ def run_options_bubble_ticker():
def run_analyst_rating(): def run_analyst_rating():
run_command(["python3", "cron_analyst_insight.py"]) week = datetime.today().weekday()
run_command(["python3", "cron_analyst_db.py"]) if week <= 4:
run_command(["python3", "cron_analyst_ticker.py"]) 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(): def run_market_moods():
week = datetime.today().weekday() week = datetime.today().weekday()
@ -210,7 +212,9 @@ def run_options_gex():
def run_hedge_fund(): 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(): def run_dashboard():
week = datetime.today().weekday() week = datetime.today().weekday()
@ -226,49 +230,59 @@ def run_export_price():
run_command(["python3", "cron_export_price"]) run_command(["python3", "cron_export_price"])
def run_tracker(): def run_tracker():
# Run Python scripts
scripts = [ scripts = [
"cron_reddit_tracker.py", "cron_reddit_tracker.py",
"cron_reddit_statistics.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: for script in scripts:
run_command(["python3", script]) 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(): 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(): 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(): 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(): 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(): 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(): def run_economy_indicator():
run_command(["python3", "cron_economic_indicator.py"]) week = datetime.today().weekday()
if week <= 4:
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"])
def run_ai_score(): def run_ai_score():