add reddit tracker cron job

This commit is contained in:
MuslemRahimi 2024-07-27 16:22:51 +02:00
parent ba912469b3
commit c9d6018f69

View File

@ -414,6 +414,16 @@ def run_dashboard():
]
run_command(command)
def run_reddit_tracker():
run_command(["python3", "cron_reddit_tracker.py"])
run_command(["python3", "cron_reddit_statistics.py"])
command = [
"sudo", "rsync", "-avz", "-e", "ssh",
"/root/backend/app/json/reddit-tracker",
f"root@{useast_ip_address}:/root/backend/app/json"
]
run_command(command)
# Create functions to run each schedule in a separate thread
def run_threaded(job_func):
job_thread = threading.Thread(target=job_func)
@ -463,6 +473,9 @@ schedule.every(15).minutes.do(run_threaded, run_cron_market_news).tag('market_ne
schedule.every(10).minutes.do(run_threaded, run_one_day_price).tag('one_day_price_job')
schedule.every(15).minutes.do(run_threaded, run_cron_heatmap).tag('heatmap_job')
schedule.every(30).minutes.do(run_threaded, run_reddit_tracker).tag('reddit_tracker_job')
schedule.every(1).minutes.do(run_threaded, run_cron_quote).tag('quote_job')
schedule.every(1).minutes.do(run_threaded, run_cron_price_alert).tag('price_alert_job')
schedule.every(15).minutes.do(run_threaded, run_market_moods).tag('market_moods_job')