zoukankan      html  css  js  c++  java
  • Windows系统中,循环运行.bat/.exe等文件

    一、创建循环运行的run-everySecond.vbs文件【双击次文件即可启动运行】

    dim a
    
    set a=CreateObject("Wscript.Shell")
    
    Do
    ##运行xxx.exe文件,后面的0表示:不弹出运行黑窗口
    a.run "E:/xxx.exe",0
    
    Wscript.Sleep 60000
    
    Loop

    注:

    1.a.run "E:/xxx.exe",0 :运行xxx.exe文件,后面的0表示不弹出运行黑窗口

    2.Wscript.Sleep 60000:休息60秒,即每分钟循环执行

    二、创建停止循环运行的shutdown-everySecond.vbs文件【双击次文件即可停止运行】

    dim WSHshell 
    set WSHshell = wscript.createobject("wscript.shell") 
    WSHshell.run "taskkill /im wscript.exe /f ",0 ,true

    或者创建停止运行的shutdown-everySecond.bat文件【双击次文件即可停止运行】

    taskkill -f -t -im wscript.exe

    注:bat文件,没法去掉黑窗口的弹出

  • 相关阅读:
    input 蓝边
    4.【ac自动机】模式串匹配
    3.【二叉树】最近公共祖先
    2.【动态规划】最长回文子串
    1. 【线段树】
    DbUtil
    oauth2
    cas
    Spring-security-web
    JSON Web Tokens
  • 原文地址:https://www.cnblogs.com/hongmoshui/p/10868228.html
Copyright © 2011-2022 走看看