@echo off
setlocal
call :GetUnixTime UNIX_TIME
echo Aktuelle Zeit: %UNIX_TIME%

SET /p variable=<lastStart.txt
echo Letzter Start: %variable%

SET /a diff=%UNIX_TIME%-%variable%
echo Differenz: %diff%

echo %UNIX_TIME%>lastStart.txt

::Die 10 an die benötigte Zeit anpassen
if %diff% LSS 10 GOTO DO_NOTHING

echo Zeit OK
::Hier das Programm ausfuehren


goto :EOF
:DO_NOTHING
echo Zeit zu kurz
echo Nichts ausfuehren
goto :EOF




:GetUnixTime
setlocal enableextensions
for /f %%x in ('wmic path win32_utctime get /format:list ^| findstr "="') do (
    set %%x)
set /a z=(14-100%Month%%%100)/12, y=10000%Year%%%10000-z
set /a ut=y*365+y/4-y/100+y/400+(153*(100%Month%%%100+12*z-3)+2)/5+Day-719469
set /a ut=ut*86400+100%Hour%%%100*3600+100%Minute%%%100*60+100%Second%%%100
endlocal & set "%1=%ut%" & goto :EOF