Files
keyhunter-parser/START.bat

21 lines
1.1 KiB
Batchfile

@echo off
title KeyHunter START
color 0B
cd /d "C:\Users\User\Desktop\keyhunter"
echo ============================================================
echo KeyHunter START
echo Launches WATCHDOG (auto-restarts parser+validator)
echo ============================================================
echo.
REM Kill stale KeyHunter instances ONLY — PID-file + cmdline match
for %%P in (data\parser.pid data\validator.pid) do (
if exist %%P for /f %%i in (%%P) do taskkill /F /T /PID %%i >nul 2>&1
)
powershell -NoProfile -Command "Get-CimInstance Win32_Process -Filter \"Name='python.exe'\" | Where-Object { $_.CommandLine -match 'eternal_v10|validator_v10|master_fleet|_eternal\.py|universal_hunt|dashscope_hunt' } | ForEach-Object { Stop-Process -Id $_.ProcessId -Force }" >nul 2>&1
timeout /t 2 /nobreak >nul
powershell -NoProfile -Command "Remove-Item data\parser.lock,data\parser.pid,data\validator.lock,data\validator.pid -Force -ErrorAction SilentlyContinue"
echo Starting WATCHDOG...
powershell -ExecutionPolicy Bypass -NoExit -File "C:\Users\User\Desktop\keyhunter\watchdog.ps1"