Windows Task 登録

設定
手動で実施で忘れた最終手段として
マシンシャットダウンのタスク登録お願いします。
(毎日19時に強制シャットダウンするタスクです。)

以下タスク登録手順
1)ファイル名を指定して実行に以下のコマンド入力
taskschd.msc /s

2)起動されたタスクスケジューラから以下の操作実施
・操作⇒タスクインポート
・添付したXMLファイル選択

3)タスク作成画面で以下の操作実施
・「ユーザーまたはグループの変更」ボタン押下
・「選択するオブジェクト名を入力してください」欄にPCユーザ名入力
・「名前の確認」ボタン押下

4)「ok」ボタン押下し終了

 

pc_shutdown.xml
<?xml version=”1.0″ encoding=”UTF-16″?>
<Task version=”1.2″ xmlns=”http://schemas.microsoft.com/windows/2004/02/mit/task”>
<RegistrationInfo>
<Date>2017-11-07T15:44:31.5198103</Date>
<Author>erma-PC\erma</Author>
</RegistrationInfo>
<Triggers>
<CalendarTrigger>
<StartBoundary>2017-11-07T19:00:00</StartBoundary>
<Enabled>true</Enabled>
<ScheduleByDay>
<DaysInterval>1</DaysInterval>
</ScheduleByDay>
</CalendarTrigger>
</Triggers>
<Principals>
<Principal id=”Author”>
<UserId>erma-PC\erma</UserId>
<LogonType>Password</LogonType>
<RunLevel>LeastPrivilege</RunLevel>
</Principal>
</Principals>
<Settings>
<MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy>
<DisallowStartIfOnBatteries>true</DisallowStartIfOnBatteries>
<StopIfGoingOnBatteries>true</StopIfGoingOnBatteries>
<AllowHardTerminate>true</AllowHardTerminate>
<StartWhenAvailable>false</StartWhenAvailable>
<RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable>
<IdleSettings>
<StopOnIdleEnd>true</StopOnIdleEnd>
<RestartOnIdle>false</RestartOnIdle>
</IdleSettings>
<AllowStartOnDemand>true</AllowStartOnDemand>
<Enabled>true</Enabled>
<Hidden>false</Hidden>
<RunOnlyIfIdle>false</RunOnlyIfIdle>
<WakeToRun>false</WakeToRun>
<ExecutionTimeLimit>P3D</ExecutionTimeLimit>
<Priority>7</Priority>
</Settings>
<Actions Context=”Author”>
<Exec>
<Command>C:\Windows\System32\shutdown.exe</Command>
<Arguments>-s -t 60 -f -c “強制終了を伴うシャットダウン(計画停電)”</Arguments>
</Exec>
</Actions>
</Task>

Add a Comment

您的电子邮箱地址不会被公开。 必填项已用*标注