vbs计划任务
前提:F:/workspace/test目录下有My.exe依赖的配置
1.如果test.vbs也在F:/workspace/test目录下 test.vbs文件内容如下:
Dim Wsh
Set Wsh = WScript.CreateObject("WScript.Shell")
WScript.Sleep 5000
Wsh.Run "F:/workspace/test/My.exe",,True
WScript.quit
或者
Dim Wsh
Set Wsh = WScript.CreateObject("WScript.Shell")
WScript.Sleep 5000
Wsh.Run "My.exe",,True
WScript.quit
计划任务里指向该test.vbs文件
2.如果test.vbs不在F:/workspace/test目录下,则需要一个bat文件转(假如叫test.bat)
test.vbs文件内容如下(去执行bat):
Dim Wsh
Set Wsh = WScript.CreateObject("WScript.Shell")
WScript.Sleep 5000
Wsh.Run "F:/workspace/test.bat",,True
WScript.quit
test.bat:
cd\
F:
cd F:\workspace\test
My.exe
计划任务里指向该test.vbs文件