auto update ?
This commit is contained in:
parent
b64339bdab
commit
9082f9b87c
19
Flask/app.py
19
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:
|
||||
|
|
Loading…
Reference in New Issue