markdown 将Windows服务设置为delayed-auto,并在失败时重新启动

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了markdown 将Windows服务设置为delayed-auto,并在失败时重新启动相关的知识,希望对你有一定的参考价值。


## Given a list of windows services
- Start each of them
- Configure each of them to start automatically, but with a delay
- On failure, restart the service

```powershell
$services = ("OctopusDeploy Tentacle","seq","tcagent")
foreach ($service in $services){
  Start-Service  -Name $Service
  sc.exe config  $Service start= "delayed-auto"
  sc.exe failure $service reset= 86400 actions= restart/5000/restart/5000/reboot/5000
}
```

以上是关于markdown 将Windows服务设置为delayed-auto,并在失败时重新启动的主要内容,如果未能解决你的问题,请参考以下文章

markdown cliente del servicio web

markdown 春天Teroia。 Ambientacion del equipo

BootStrap详解之

markdown Post para generar QR del POS

markdown eventos formales,contenidos dentro del Sprint

WindowsEmbeddedPOSReady7怎么装