:start
call 123.exe
ping 127.0.0.1 -n 10>nul
goto start
簡單做了一個 timer.bat
:: timer tt.bat 5 > ./logs/tt.log
@echo off
chcp 65001
if {%1} == {} ( goto bye )
if {%2} == {} ( goto default-loop-sec )
:init
set _timer_sec=%2
goto do-loop
:default-loop-sec
set _timer_sec=10
:do-loop
echo:
echo %date%, %time% ----------------
echo:
call %1
echo:
ping 127.0.0.1 -n %_timer_sec% > nul
goto do-loop
:bye
0 意見:
張貼留言