From 6deef5276c5343564398b626bc0fde7e2ddc346e Mon Sep 17 00:00:00 2001 From: Prajwol-Shrestha Date: Mon, 3 Oct 2022 20:17:05 +0545 Subject: [PATCH] added Scheduled_shutdown script --- scripts/Scheduled_Shutdown/shutdown.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 scripts/Scheduled_Shutdown/shutdown.py diff --git a/scripts/Scheduled_Shutdown/shutdown.py b/scripts/Scheduled_Shutdown/shutdown.py new file mode 100644 index 0000000..1623f14 --- /dev/null +++ b/scripts/Scheduled_Shutdown/shutdown.py @@ -0,0 +1,17 @@ +import os +import time + +def shutdown(): + os.system("shutdown /s /t 1") + +set_time = input("Shutdown After ----> ") +set_time = int(set_time) + +sec = 60 + +print('Computer Will Now Shutdown in ' + str(set_time) + ' Minutes') +time.sleep(set_time*sec) +print('\n') +print('Computer Will Now Shutdown!') +time.sleep(3) +shutdown()