Issue with Task Scheduler launching a task

Scheduled Tasks

Scheduled Tasks Problem Overview


I have a task scheduled in my Windows 2008 R2 machine but it failed to trigger with the following error in the log (Event logs).

Error:

Task Scheduler failed to start "\Hyatt_International_Distribution" task for user "SAFFRON3\cb_admin". Additional Data: Error Value: 2147943645.

Task Scheduler failed to start Task Engine "" process due to an error occurring in "LUAIsElevatedToken" . Command="taskeng.exe" . Additional Data: Error Value: 2147943645.

The complete error is as below:

Log Name: Microsoft-Windows-TaskScheduler/Operational Source: Microsoft-Windows-TaskScheduler Date: 4/16/2012 9:59:59 AM Event ID: 101 Task Category: Task Start Failed Level: Error Keywords:
User: SYSTEM Computer: xyz Description: Task Scheduler failed to start "\Distribution" task for user "SAFFRON3\cb_admin". Additional Data: Error Value: 2147943645. Event Xml:

<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>0x8000000000000000</Keywords>
    <TimeCreated SystemTime="2012-04-16T14:59:59.950Z" />
    <EventRecordID>101476</EventRecordID>
    <Correlation />
    <Execution ProcessID="336" ThreadID="1216" />
    <Channel>Microsoft-Windows-TaskScheduler/Operational</Channel>
    <Computer>xyz</Computer>
    <Security UserID="S-1-5-18" />
  </System>
  <EventData Name="TaskStartFailedEvent">
    <Data Name="TaskName">\Distribution</Data>
    <Data Name="UserContext">SAFFRON3\cb_admin</Data>
    <Data Name="ResultCode">2147943645</Data>
  </EventData>
</Event>

The task is set as: Run s if user is logged in or not, With Highest privileges, Power: Start when on AC power, Allow task run on demand.

The task runs almost everyday, correctly, but failed yesterday. Any particular reason?

Scheduled Tasks Solutions


Solution 1 - Scheduled Tasks

On properties,

Check whether radio button is selected for

Run only when user is logged on 

If you selected for the above option then that is the reason why it is failed.

so change the option to

Run whether user is logged on or not

OR

In other case, user might have changed his/her login credentials

Solution 2 - Scheduled Tasks

My task was set to Run only when user is logged on and it was failing for me even while I was logged in and starting it manually. The user was set to me already. No password changes, etc.

I solved it by clicking "Change user" and selecting myself again.

I suspect it may have been caused by AD changing the user SID or something to that extent. Perhaps IT was doing some user management in AD, who knows.

Solution 3 - Scheduled Tasks

I solved the issue by opening up the properties on the exe-file itself. On the tab Compatibility there's a check box for privilege level that says "Run this as an administrator"

Even though my account have administration privileges it didn't work when I started it from task scheduler.

I unchecked the box and started it from the scheduler again and it worked.

Solution 4 - Scheduled Tasks

As far as I know you will need to give the domain account the proper "User Rights" such as "Log on as a Batch Job". You can check that in your Local Policies. Also, you might have a Domain GPO which is overwriting your local policies. I bet if you add this Domain Account into the local admin group of that machine, your problem will go away. A few articles for you to check:

http://social.technet.microsoft.com/Forums/en/windowsserver2008r2general/thread/9edcb63a-d133-45a0-9e8c-f1b774765531 http://social.technet.microsoft.com/Forums/lv/winservergen/thread/68019b24-78a5-4db0-a150-ada921930924 http://sqlsolace.blogspot.com/2009/08/task-scheduler-task-does-not-run-error.html?m=1 http://technet.microsoft.com/en-us/library/cc722152.aspx

Solution 5 - Scheduled Tasks

  • Right Click on the Task in Task Scheduler
  • Click on the Actions tab
  • Click on Edit
  • Remove the quotes around the path in the "Starts In" textbox.

Solution 6 - Scheduled Tasks

My task also failed to start.

I solved it by specifying not only the path to the executable, but also the path to the folder of the executable (Tab "Actions" | Edit | TextBox "Start in").

Solution 7 - Scheduled Tasks

Thanks all, I had the same issue. I have a task that runs via a generic user account not linked to a particular person. This user as somehow logged off the VM, when I was trying to fix it I was logged in as me and not that user.

Logging back in with that user fixed the issue!

Solution 8 - Scheduled Tasks

I was having the same issue. I tried with the compatibility option, but in Windows 10 it doesn't show the compatibility option. The following steps solved the problem for me:

  1. I made sure the account with which the task was running had the full access privileges on the file to be executed. (Executed the task and was still not running)
  2. I man taskschd.msc as administrator
  3. I added the account to run the task (whether was it logged or not)
  4. I executed the task and now IT WORKED!

So somehow setting up the task in taskschd.msc as a regular user wasn't working, even though my account is an admin one.

Hope this helps anyone having the same issue

Solution 9 - Scheduled Tasks

Check whether you are scheduling a task to trigger an executable (.exe) or a batch (.bat) file. If you have scheduled any other file to open (for example a .txt or .docx file), the file not open.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionKaustyView Question on Stackoverflow
Solution 1 - Scheduled TasksSiva CharanView Answer on Stackoverflow
Solution 2 - Scheduled TasksMr. TAView Answer on Stackoverflow
Solution 3 - Scheduled TasksplogisView Answer on Stackoverflow
Solution 4 - Scheduled TasksMaxView Answer on Stackoverflow
Solution 5 - Scheduled TasksBikeyView Answer on Stackoverflow
Solution 6 - Scheduled TasksPollitzerView Answer on Stackoverflow
Solution 7 - Scheduled TasksJasonRView Answer on Stackoverflow
Solution 8 - Scheduled TasksAltagstod BelievesView Answer on Stackoverflow
Solution 9 - Scheduled TasksMuthukumar NatesanView Answer on Stackoverflow