2016-04-09 5 views
0

次のコマンドを実行すると、Windowsサービスが30秒後に再起動することがわかります。コマンドscのaction = rebootパラメータの目的は何ですか?

ここで、この記事では
sc failure %SERVICE_NAME% reset= 60 actions= restart/30000 

https://technet.microsoft.com/en-us/library/cc742019.aspx#BKMK_examples

彼らは、次のコマンド例があります。

sc failure myservice reset= 3600 reboot= "MyService crashed -- rebooting machine" command= "%windir%\MyServiceRecovery.exe" actions= restart/5000/run/10000/reboot/60000 

を誰もが再起動アクションが何をするのか説明していただけますか?

私は、最初にrebootパラメータで指定されたメッセージをブロードキャストし、コマンドパラメータで実行可能ファイルを実行すると考えています。 sc failure /?を入力

答えて

0

は内蔵のヘルプれます:あなたが疑われたよう

DESCRIPTION: 
     Changes the actions upon failure 
USAGE: 
     sc <server> failure [service name] <option1> <option2>... 

OPTIONS: 
     reset= <Length of period of no failures (in seconds) 
        after which to reset the failure count to 0 (may be INFINITE)> 

        (Must be used in conjunction with actions=) 
     reboot= <Message broadcast before rebooting on failure> 
     command= <Command line to be run on failure> 
     actions= <Failure actions and their delay time (in milliseconds), 
        separated by/(forward slash) -- e.g., run/5000/reboot/800 
        Valid actions are <run|restart|reboot> > 
        (Must be used in conjunction with the reset= option) 

を、rebootオプションが放送されるメッセージを指定します。

関連する問題