We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3569c88 commit 55be734Copy full SHA for 55be734
auto_shutdown/README.md
@@ -0,0 +1,5 @@
1
+# auto_shutdown
2
+
3
+Shutdowns device after x minutes
4
5
+## Built Using os and time modules ( built in )
auto_shutdown/auto_shutdown.py
@@ -0,0 +1,17 @@
+import os
+import time
+def shutdown():
+ os.system("shutdown /s /t 1")
6
7
+set_time = input("Shutdown After ----> ")
8
+set_time = int(set_time)
9
10
+sec = 60
11
12
+print('Computer Will Now Shutdown in ' + str(set_time) + ' Minutes')
13
+time.sleep(set_time*sec)
14
+print('\n')
15
+print('Computer Will Now Shutdown!')
16
+time.sleep(3)
17
+shutdown()
0 commit comments