From 7af6736f654e765ac86f241deaf5a1671b5e2cc6 Mon Sep 17 00:00:00 2001 From: mhinestrosa Date: Tue, 7 May 2024 15:24:55 +0200 Subject: [PATCH] first commit --- setup.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 setup.py 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')