Merge branch 'claude/charming-mclean-0c655c' into claude/agitated-bell-bd4ac2
This commit is contained in:
commit
e0c420992c
1 changed files with 5 additions and 1 deletions
|
|
@ -290,7 +290,11 @@ try { Stop-ScheduledTask -TaskName "BNS Sia Bridge" -ErrorAction Stop } catch {}
|
|||
# Pass --policy so bnsd.js applies the chosen collision mode (docs: 4b).
|
||||
$action = New-ScheduledTaskAction -Execute $node -Argument "`"$daemon`" --upstream $Upstream --policy $Policy" -WorkingDirectory $root
|
||||
$trigger = New-ScheduledTaskTrigger -AtStartup
|
||||
$settings = New-ScheduledTaskSettingsSet -RestartCount 5 -RestartInterval (New-TimeSpan -Minutes 1) -ExecutionTimeLimit (New-TimeSpan -Days 3650)
|
||||
# Battery flags: New-ScheduledTaskSettingsSet defaults to DisallowStartIfOnBatteries
|
||||
# + StopIfGoingOnBatteries, so on a laptop running on battery the resolver never
|
||||
# started at boot and was killed the moment the charger came out. The Sia
|
||||
# bridge below reuses this set.
|
||||
$settings = New-ScheduledTaskSettingsSet -AllowStartIfOnBatteries -DontStopIfGoingOnBatteries -RestartCount 5 -RestartInterval (New-TimeSpan -Minutes 1) -ExecutionTimeLimit (New-TimeSpan -Days 3650)
|
||||
Register-ScheduledTask -TaskName "BNS Resolver Daemon" -Action $action -Trigger $trigger -Settings $settings `
|
||||
-User "SYSTEM" -RunLevel Highest -Force | Out-Null
|
||||
Start-ScheduledTask -TaskName "BNS Resolver Daemon"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue