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>
Cause : This event is logged when Task Scheduler failed to start the task for user. Resolution : Use error code to diagnose launch failure. Use the error code provided in the launch failure event to further diagnose reasons for a task failing to start.
"Run with highest privileges" (test both options) "Run wheter user is logged on or not" (test both options) Check that "Configure for" is set to your machine's OS version. Make sure the user account running the program has the right permissions.
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.
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'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With