This commit is contained in:
MuslemRahimi 2025-02-03 20:39:32 +01:00
parent ca9156e5b9
commit 0c6ffd26c0

View File

@ -347,13 +347,13 @@ def run_ai_score():
run_command(["python3", "restart_json.py"])
run_command(["python3", "cron_statistics.py"])
def run_push_notification():
def run_push_notifications():
now = datetime.now(ny_tz)
week = now.weekday()
hour = now.hour
if week <= 4 and 7 <= hour < 22:
run_command(["python3", "cron_push_notification.py"])
run_command(["python3", "cron_push_notifications.py"])
# Create functions to run each schedule in a separate thread
@ -422,7 +422,7 @@ schedule.every(1).hours.do(run_threaded, run_company_news).tag('company_news_job
schedule.every(3).hours.do(run_threaded, run_press_releases).tag('press_release_job')
schedule.every(15).minutes.do(run_threaded, run_push_notification).tag('push_notification_job')
schedule.every(15).minutes.do(run_threaded, run_push_notifications).tag('push_notifications_job')
schedule.every(30).minutes.do(run_threaded, run_options_stats).tag('options_stats_job')
schedule.every(5).minutes.do(run_threaded, run_market_flow).tag('market_flow_job')