1
我使用schtasks
實用工具在Windows-XP上安排了一項任務,但該任務未運行。以下是我看到SchedLgU.Txt
日誌文件:爲什麼「schtasks」不能運行我的工作?
"MySQL Automatic Backup.job" (WampServer) 10/2/2010 6:36:43 PM ** ERROR **
Unable to start task.
The specific error is:
0x800700c1: (Unable to find an error message)
Try using the Task page Browse button to locate the application.
我發現這個錯誤的原因是在路徑給我的腳本空間。我用來設置任務的命令如下所示:
schtasks /create /tn "MySQL Automatic Backup"
/tr "d:\path with spaces to my script\my script.bat" /sc daily ...
如果我用下劃線替換空格,例如,問題就會消失。
我該如何解決這個問題?
而另一個問題:Start In
列在schtasks /query /v
的輸出中意味着什麼?
謝謝!
我有我的任務通過C#代碼添加。我可以在「任務計劃程序」中將該操作作爲exe的完整路徑。但是,當時間到了執行它不工作,下一個任務時間顯示。 cmd中的schtasks/query表示「無法啓動」爲狀態。什麼應該是錯誤的? – 2013-03-01 10:16:40
哇,這讓我走上了正軌。使用\「爲內部引號。請參閱http://stackoverflow.com/questions/16723940/powershell-add-task-to-run-powershell-script-with-parameters/16737858#16737858 – Brent 2013-05-24 14:56:04