10 lines
339 B
Python
10 lines
339 B
Python
# 定时执行cmd命令
|
||
import os
|
||
import time
|
||
|
||
while True:
|
||
print(time.strftime('%H:%M'))
|
||
# 判断是不是工作日且 是17:00 7:00 才执行
|
||
if time.strftime('%A') not in ['Saturday', 'Sunday'] and time.strftime('%H:%M') in [ '07:00']:
|
||
os.system(' D:/ProgramData/anaconda3/python.exe main.py')
|
||
time.sleep(60) |