用vbs来调用bat,然后让windows定时任务来执行这个vbs

案例如下:

call.vbs 文件内容:

set ws=WScript.CreateObject("WScript.Shell")
ws.Run "e:\dba_tools\copy_file.bat",0

其他方法:

第一种解决办法(推荐) :
在你写的批处理文件,开头加上以下三行代码即可

if "%1"=="hide" goto CmdBegin
start mshta vbscript:createobject("wscript.shell").run("""%~0"" hide",0)(window.close)&&exit
:CmdBegin