Files
rk35xx-android14/external/python/dateutil/ci_tools/retry.bat
T
hmz007 36ed224bac Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a)
Signed-off-by: hmz007 <hmz007@gmail.com>
Change-Id: Ib87fdbe7a0be7dc961af3500fe9ea4589a127f9f
2024-10-29 18:12:02 +08:00

19 lines
454 B
Batchfile

@echo off
REM This script takes a command and retries it a few times if it fails, with a
REM timeout between each retry.
setlocal EnableDelayedExpansion
REM Loop at most n_retries times, waiting sleep_time times between
set sleep_time=60
set n_retries=5
for /l %%x in (1, 1, %n_retries%) do (
call %*
if not ERRORLEVEL 1 EXIT /B 0
timeout /t %sleep_time% /nobreak > nul
)
REM If it failed all n_retries times, we can give up at last.
EXIT /B 1