Batch file fails task scheduler
Our Man in Bananas Our Man in Bananas 5, 20 20 gold badges 86 86 silver badges bronze badges. Is your task running with restricted privileges? Are you on a bit OS? Works for me. I suspect something is wrong with the configuration of your scheduled task. What did you configure in the task's security options? The error message suggests that there is no Word process running in the context of the user the task is running as.
The Word instance is created by a. NET application running under the same account. Add a comment. Active Oldest Votes. GetObject , "Word. Improve this answer. This two options must be combined: -Run only when user is logged on -Run with highest privileges. All other variations failed. It's infuriating all the time wasted on this, but at least it works. The cmd window will not show if you select Run whether user is logged in or not. You need to select Run only when user is logged on to see the window in action.
Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Run a batch file with Windows task scheduler Ask Question. Asked 11 years, 1 month ago. Active 5 months ago.
Viewed k times. I have a batch file daily. Any idea why this is not working? Improve this question. Ruben Ruben 8, 13 13 gold badges 59 59 silver badges 96 96 bronze badges.
Not sure if this question is offtopic but you might get better responses on serverfault. Thanks I'll also try to post it on serverfault — Ruben. Add a comment. Active Oldest Votes. I faced the same problem, but I found another solution without having to modify my batch script. The only thing that I missed out is at the 'Action' settings - "Start in Optional " option. Good Luck! Improve this answer.
Matthew Lock Thanks for your feedback. This thread is locked. You can follow the question or vote as helpful, but you cannot reply to this thread. I have the same question Report abuse. Details required :. I know that Task Scheduler can record an error if the batchfile itself fails but since the batch is running third-party backup executables, I'm not even sure if an error could be sent to the event logs.
Monday, February 16, PM. I figured it out. You can use a batch file to trigger an event. I'll post my result below, hopefully someone else may find it useful. Glad to hear this and thanks for sharing the solution!
0コメント