Fix Windows autostart task command

This commit is contained in:
2026-08-07 18:33:40 +08:00
parent 89463e2706
commit eeab017927
2 changed files with 28 additions and 2 deletions
+19
View File
@@ -0,0 +1,19 @@
@echo off
setlocal
cd /d "%~dp0"
set "LOG_DIR=%~dp0logs"
set "LOG_FILE=%LOG_DIR%\autostart.log"
if not exist "%LOG_DIR%" mkdir "%LOG_DIR%"
echo.>> "%LOG_FILE%"
echo [%DATE% %TIME%] Starting DocuTranslate autostart runner...>> "%LOG_FILE%"
call "%~dp0run.bat" >> "%LOG_FILE%" 2>&1
set "EXIT_CODE=%ERRORLEVEL%"
echo [%DATE% %TIME%] DocuTranslate stopped with exit code %EXIT_CODE%.>> "%LOG_FILE%"
exit /b %EXIT_CODE%