📜  安排计算机关机 python - 任何代码示例

📅  最后修改于: 2022-03-11 14:55:40.549000             🧑  作者: Mango

代码示例1
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)