标签:ftime else coding sys obj chdir test while 定时
#coding=utf-8
import os,time
k=1
while k <2:
now_time=time.strftime(‘%H_%M‘)
if now_time == ‘21_00‘:
print u"开始运行脚本:"
os.chdir("E:\\test_object")
os.system(‘Python all_test.py‘) #执行脚本
print u"运行完成退出"
break
else:
time.sleep(10)
print now_time
标签:ftime else coding sys obj chdir test while 定时
原文地址:http://www.cnblogs.com/czb529514/p/7676074.html