希望能幫助:
<?xml version="1.0" encoding="UTF-16"?>
<Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
<RegistrationInfo>
<Date>2015-12-14T11:26:48.2627112</Date>
<Author>DOMAIN\MyUsername</Author>
</RegistrationInfo>
<Triggers />
<Principals>
<Principal id="Author">
<UserId>DOMAIN\MyUsername</UserId>
<LogonType>Password</LogonType>
<RunLevel>HighestAvailable</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:\Program Files\Java\jdk1.7.0_67\bin\java.exe"</Command>
<Arguments>-jar "MyPathToJar"</Arguments>
<WorkingDirectory>MyPath</WorkingDirectory>
</Exec>
</Actions>
</Task>
顯然目前還不清楚你做了什麼,但在上面的模板提供嘗試改變<Author>
,<UserId>
,<Command>
,<Arguments>
,<WorkingDirectory>
有自己的屬性,然後導入調度器上的整個xml。
請記住設置具有最高權限的執行。
值得一試。
你有沒有檢查系統的環境變量?檢查系統路徑中是否存在JAVA_HOME \ bin。 – sgpalit
你是什麼意思**當我在命令行中手動執行此命令時,** – SpringLearner
Windows事件日誌中是否有任何錯誤消息? –