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.
2 parents e0f9b7f + 749c1a6 commit fbcd181Copy full SHA for fbcd181
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,21 @@
+import os
+import time
+def shutdown():
6
+ os.system("shutdown /s /t 1")
7
8
9
+set_time = input("Shutdown After ----> ")
10
11
12
+set_time = int(set_time)
13
14
+sec = 60
15
16
+print('Computer Will Now Shutdown in ' + str(set_time) + ' Minutes')
17
+time.sleep(set_time * sec)
18
+print('\n')
19
+print('Computer Will Now Shutdown!')
20
+time.sleep(3)
21
+shutdown()
0 commit comments