Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Configuration
- $primePath = "C:\tools\prime95\prime95.exe"
- $primeDir = "C:\tools\prime95"
- $totalDurationMinutes = 120 # 2 hours
- $intervalMinutes = 2 # 2 minutes load, 2 minutes rest
- # Calculate total loops (Each loop has 1 load and 1 rest interval = 4 minutes total)
- $loopDurationMinutes = $intervalMinutes * 2
- $totalLoops = $totalDurationMinutes / $loopDurationMinutes
- # Counter for successful heat cycles
- $completedCycles = 0
- Write-Host "Starting Prime95 cyclic test for $totalDurationMinutes minutes ($totalLoops expected cycles)..." -ForegroundColor Cyan
- Write-Host "--------------------------------------------------------"
- for ($i = 1; $i -le $totalLoops; $i++) {
- Write-Host "=== Cycle $i of $totalLoops ===" -ForegroundColor Yellow
- # --- LOAD PHASE ---
- Write-Host "$(Get-Date -Format 'HH:mm:ss') - Starting Prime95 (Load Phase)..." -ForegroundColor Green
- # -t launches Prime95 directly into the torture test using existing prime.txt settings
- $primeProcess = Start-Process -FilePath $primePath -WorkingDirectory $primeDir -ArgumentList "-t" -PassThru
- # Wait for 2 minutes of heavy load
- Start-Sleep -Seconds ($intervalMinutes * 60)
- # --- REST PHASE ---
- Write-Host "$(Get-Date -Format 'HH:mm:ss') - Stopping Prime95 (Rest Phase)..." -ForegroundColor Blue
- # Gracefully stop the process if it's still running
- if ($primeProcess -and -not $primeProcess.HasExited) {
- Stop-Process -Id $primeProcess.Id -Force
- }
- # Increment our heat cycle counter now that the load phase for this cycle is done
- $completedCycles++
- # Wait for 2 minutes (Cooldown) - Skip the final rest if we hit the total time limit
- if ($i -lt $totalLoops) {
- Write-Host "Holding/resting for $intervalMinutes minutes..." -ForegroundColor Gray
- Start-Sleep -Seconds ($intervalMinutes * 60)
- }
- }
- # --- SUMMARY END OF SCRIPT ---
- Write-Host "--------------------------------------------------------" -ForegroundColor Cyan
- Write-Host "$(Get-Date -Format 'HH:mm:ss') - Cyclic test complete!" -ForegroundColor Cyan
- Write-Host "Total completed heat cycles: $completedCycles" -ForegroundColor Magenta
- Write-Host "--------------------------------------------------------" -ForegroundColor Cyan
Advertisement
Add Comment
Please, Sign In to add comment