ExMan

python反复执行某个命令

#! /usr/bin/env python
#coding=utf-8
# 以需要的时间间隔执行某个命令
  
import time, os
  
def re_exe(cmd, inc = 60):
 while True:
  os.system(cmd);
  time.sleep(inc)
  
re_exe("echo %time%", 5)

分类:

技术点:

相关文章:

  • 2021-12-28
  • 2021-10-31
  • 2021-12-06
  • 2021-12-21
  • 2022-01-02
  • 2021-12-21
  • 2021-12-21
猜你喜欢
  • 2021-12-18
  • 2021-12-18
  • 2021-12-21
  • 2021-12-24
  • 2021-12-06
  • 2022-01-02
  • 2021-04-11
相关资源
相似解决方案