Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

schedule computer shutdown python

import schedule
import time
import os

when= "20:11"
print("The computer will be shutdown at " + when + "")

def job():
    os.system("shutdown /s /t 1")

schedule.every().day.at(when).do(job)

while True:
    schedule.run_pending()
    time.sleep(1)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #schedule #computer #shutdown #python
ADD COMMENT
Topic
Name
5+9 =