簡體   English   中英

命令提示符停止,等待,啟動

[英]Command Prompt Stop, Wait, Start

我想要一個簡單的批處理,同時執行以下操作

停止服務等待3分鍾啟動服務

所以我有

net stopMitral Tasks Service
net startMitral Tasks Service
timeout /t 180

net stopMitral Tasks Service
net startMitral Tasks Service

這行得通嗎?

就Net stopService而言,僅需要這些-沒有指向實際.exe的文件路徑?

這將停止,然后重新啟動列出的服務,等待180秒鍾,然后重復執行。

net stop "Mitral Tasks Service"
net start "Mitral Tasks Service"
timeout /t 180 /nobreak
net stop "Mitral Tasks Service"
net start "Mitral Tasks Service"

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM