diff --git a/Flask/app.py b/Flask/app.py index 48f4ff1..f4919e7 100644 --- a/Flask/app.py +++ b/Flask/app.py @@ -25,15 +25,32 @@ if secret == "": """ #Automatic start of MsRewards """ +def daily_command(): + subprocess.Popen(["git",'pull']) + subprocess.Popen(["pkill",'-9', "chrome"]) + subprocess.Popen(["pkill",'-9', "Xvfb"]) + subprocess.Popen(["pkill",'-9', "undetected_chromedriver"]) + + scheduler = BackgroundScheduler() scheduler.start() - +scheduler.add_job( # on relance le job + daily_command, # --- + trigger=CronTrigger( + year="*", month="*", day="*", hour="0", minute="0", second="0" + ), # --- + name="Daily refresh", # --- + id=99 # --- +) def start_ms(i): print("\033[32m" + f"Starting config {i}" + "\033[0m") subprocess.Popen(["python3",'-u' ,"/app/MsRewards-Reborn/V6.py", "-c", i]) + + + TriggerDict = {} def update_jobs(): with open("/app/MsRewards-Reborn/user_data/configs.json", "r") as inFile: diff --git a/version b/version index 0d24c42..6e0d7fb 100644 --- a/version +++ b/version @@ -1 +1 @@ -v6.0.3 +v6.0.4