From 6deef5276c5343564398b626bc0fde7e2ddc346e Mon Sep 17 00:00:00 2001 From: Prajwol-Shrestha Date: Mon, 3 Oct 2022 20:17:05 +0545 Subject: [PATCH 1/2] 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() From 73eaf507871fb04287868034dbd916c0fa9e2a65 Mon Sep 17 00:00:00 2001 From: Prajwol-Shrestha Date: Tue, 4 Oct 2022 08:55:34 +0545 Subject: [PATCH 2/2] added readme in shutdown.py --- scripts/Scheduled_Shutdown/README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 scripts/Scheduled_Shutdown/README.md diff --git a/scripts/Scheduled_Shutdown/README.md b/scripts/Scheduled_Shutdown/README.md new file mode 100644 index 0000000..b943be9 --- /dev/null +++ b/scripts/Scheduled_Shutdown/README.md @@ -0,0 +1,11 @@ +## Scheleduled Shutdown files ADDED #83 + + +## Requirements +Built-in modules ( os and time ) + +## Usage +Shutdowns PC after X minutes + +- Clone the repo +- run `python shutdown.py`