mirror of
https://github.com/metafy-social/python-scripts.git
synced 2024-11-23 20:11:10 +00:00
added Scheduled_shutdown script
This commit is contained in:
parent
c58deeb8b7
commit
6deef5276c
17
scripts/Scheduled_Shutdown/shutdown.py
Normal file
17
scripts/Scheduled_Shutdown/shutdown.py
Normal file
|
@ -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()
|
Loading…
Reference in New Issue
Block a user