今天有一个很简单的需求,要求定时执行一个 .bat 批处理文件。于是查看了一下 Python 文档,写出如下脚本: from win32api import *from time import *i = 1while 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) 相关文章: 2022-12-23 2021-09-02 2022-12-23 2022-12-23 2022-12-23 2021-10-18 2021-09-22 2021-11-22