需求,要求定时执行一个 .bat 批处理文件。 查看python 文档,实现了如下python定时脚本:
from win32api import * from time import *
i = 1 while 1: shellExecute(0, None, "c:test.bat", None, "c:", True) print "The job has been executed", i, "times till now." i += 1 sleep(10 * 60)
CopyRight © 2010-2021 脚本学堂 Jb200.com , All Rights Reserved.