通过Python3实现任务的定时循环执行
展开阅读全文

3.循环执行命令

#!/user/bin/env python
import time,os
def re_exe(cmd,inc = 60):
  while True:
    os.system(cmd)
    time.sleep(inc)
re_exe("echo %time%",5)