Have you ever tried to schedule a task with Windows Task Scheduler, but it does not run? Instead you get this friendly error message:
Task Scheduler failed to start “\Task Name” task for user “Domain\username”. Additional Data: Error Value: 2147943785.
Below is the error message you see when you arrive in the morning.
Luckily, this is an easy fix and is usually permission related. You just need to add the user to the “Log on as a batch job” property on the server.
To fix, go to Start Menu > Administrative Tools > Local Security Policy >
Local Policies > User Rights Assignment > Log On As Batch Job as seen below:
Double click the Log on as a batch job on the right side panel, and add the appropriate username to the group.
Apply your changes, and next time the job runs, it should run successfully.
Thank you for your post. Helped me big time.
LikeLike
Great…good to hear.
LikeLike
We’re getting the same error. But the domain account is already in that “Log On as a batch job” – running it manually it works okay. Last week when it stopped, I noticed the local admin account had “user must change pw on next logon” – I changed that to never expire. The task ran for the rest of the week fine. Checking out event viewer today I see a logon failure at the time of task – “The user has not been granted the requested logon type at this machine.” but all the other days are successful!
Strange stuff! Any idea where else I can look to figure this out?
Thanks!
LikeLike
I have never seen that. Is there a chance that the user is getting locked out by some other process and then the lock out time expires and everything runs fine?
LikeLike
That was a good thought. Its a service account, no one logs on with it. A lockout report only showed 4 lockouts in the past week (unlocks after 5 minutes) and the time stamps don’t match up anyway.
Thanks for replying!
LikeLike