commit 7af6736f654e765ac86f241deaf5a1671b5e2cc6 Author: mhinestrosa Date: Tue May 7 15:24:55 2024 +0200 first commit diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..708e0f3 --- /dev/null +++ b/setup.py @@ -0,0 +1,17 @@ +# -*- coding: utf-8 -*- +from setuphelpers import * +import subprocess + +hour_reboot = '12:00' + + +def install(): + + print('Création de la tâche de WAPTExit chaque jour à 12h00') + run(f'schtasks /create /tn "Launch WAPT Exit" /tr "waptexit" /sc daily /st {hour_reboot}') + +def uninstall(): + + print('Suppression de la tâche de WAPTExit') + if task_exists("Launch WAPT Exit") is True: + run('schtasks /delete /tn "Launch WAPT Exit" /f')