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` 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()