Windows task scheduler error 101 launch failure co

2019-02-05 10:50发布

问题:

I'm trying to schedule my C# program to run on Windows scheduler. I'm using, Windows 7 Professional.

I can create the task security options set to run whether or not the user is logged in, gave it high privileges, it is to launch an exe on a remote path which I have access to.

"Error Value: 2147943785" your help would be much appreciated.

Here's the XML for the error

- <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
- <System>
  <Provider Name="Microsoft-Windows-TaskScheduler" Guid="{DE7B24EA-73C8-4A09-985D-          5BDADCFA9017}" /> 
  <EventID>101</EventID> 
  <Version>0</Version> 
  <Level>2</Level> 
  <Task>101</Task> 
  <Opcode>101</Opcode> 
  <Keywords>0x8000000000000001</Keywords> 
  <TimeCreated SystemTime="2013-01-10T12:44:20.882178000Z" /> 
  <EventRecordID>51522</EventRecordID> 
  <Correlation /> 
  <Execution ProcessID="652" ThreadID="1892" /> 
  <Channel>Microsoft-Windows-TaskScheduler/Operational</Channel> 
  <Computer>pcb.co.za</Computer> 
  <Security UserID="S-1-5-18" /> 
  </System>
- <EventData Name="TaskStartFailedEvent">
  <Data Name="TaskName">\Naedo</Data> 
  <Data Name="UserContext">Domanin\User31r</Data> 
  <Data Name="ResultCode">2147943785</Data> 
  </EventData>
  </Event>

回答1:

The user that is configured to run this scheduled task must have "Log on as a batch job" rights on the computer that hosts the exe you are launching. This can be configured on the local security policy of the computer that hosts the exe. You can change the policy (on the server hosting the exe) under

Administrative Tools -> Local Security Policy -> Local Policies -> User Rights Assignment -> Log On As Batch Job

Add your user to this list (you could also make the user account a local admin on the machine hosting the exe).

Finally, you could also simply copy your exe from the network location to your local computer and run it from there instead.

Note also that a domain policy could be restricting "Log on as a batch job" rights at your organization.



回答2:

Had the same issue but mine was working for weeks before this. Realised I had changed my password on the server.

Remember to update your password if you've got the option selected 'Run whether user is logged on or not'



回答3:

I have the same today on Win7.x64, this solve it.

Right Click MyComputer > Manage > Local Users and Groups > Groups > Administrators double click > your name should be there, if not press add...