# Windows: регистрирует задачу в Планировщике (каждые 2 часа). # Запуск: правой кнопкой -> "Выполнить с помощью PowerShell", ИЛИ в PowerShell: # powershell -ExecutionPolicy Bypass -File .\scheduler\install-windows.ps1 $Root = (Resolve-Path "$PSScriptRoot\..").Path $Bat = Join-Path $Root "scheduler\run.bat" $Action = New-ScheduledTaskAction -Execute $Bat $Trigger = New-ScheduledTaskTrigger -Once -At (Get-Date) ` -RepetitionInterval (New-TimeSpan -Hours 2) -RepetitionDuration ([TimeSpan]::MaxValue) $Settings = New-ScheduledTaskSettingsSet -StartWhenAvailable -AllowStartIfOnBatteries ` -DontStopIfGoingOnBatteries Register-ScheduledTask -TaskName "hhbump" -Action $Action -Trigger $Trigger ` -Settings $Settings -Description "hh resume booster" -Force Write-Host "OK. Проверка: schtasks /Query /TN hhbump" Write-Host "Разовый прогон: schtasks /Run /TN hhbump" Write-Host "Удалить: schtasks /Delete /TN hhbump /F" Write-Host "Логи: $Root\bump.log"