auto update ?

This commit is contained in:
piair 2023-06-29 11:55:49 +02:00
parent b64339bdab
commit 9082f9b87c
2 changed files with 19 additions and 2 deletions

View File

@ -25,15 +25,32 @@ if secret == "":
""" """
#Automatic start of MsRewards #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 = BackgroundScheduler()
scheduler.start() 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): def start_ms(i):
print("\033[32m" + f"Starting config {i}" + "\033[0m") print("\033[32m" + f"Starting config {i}" + "\033[0m")
subprocess.Popen(["python3",'-u' ,"/app/MsRewards-Reborn/V6.py", "-c", i]) subprocess.Popen(["python3",'-u' ,"/app/MsRewards-Reborn/V6.py", "-c", i])
TriggerDict = {} TriggerDict = {}
def update_jobs(): def update_jobs():
with open("/app/MsRewards-Reborn/user_data/configs.json", "r") as inFile: with open("/app/MsRewards-Reborn/user_data/configs.json", "r") as inFile:

View File

@ -1 +1 @@
v6.0.3 v6.0.4