Scheduled Tasks Fail to Run
Asked Answered
F

2

9

I have a couple of scheduled tasks that run VBS script. It used to be set to "Run as" the person who has left our company. Obviously, after his account was removed, I had to change the tasks to run as another user.

We have an AD account that I setup to use to "run as" for each task. Tested the tasks by running it, scheduling it to run 2-3 minutes from now, and it worked. So, I scheduled the tasks to run everyday at the certain time. The next day the tasks failed with a following error:

The attempt to log on to the account associated with the task failed, therefore, the task did not run.

The specific error is: 0x80070569: Logon failure: the user has not been granted the requested logon type at this computer. Verify that the task's Run-as name and password are valid and try again.

So, I go in and see that "Run As" logon stays the same, so I re-enter the password and test the task again. It runs fine, which tells me that it recognizes the logon and password used in the "Run As" property. The next day it fails again.

Any suggestions, recommendations at what to look at?

Thanks everyone!

Farrish answered 18/1, 2013 at 18:37 Comment(0)
T
12

The account your Scheduled Task is running as needs to have the "logon as a batch job" right given to it. Use the Group Policy editor (gpedit.msc) to add that right to the relevant account. Navigate down to Computer Configuration -> Windows Settings -> Security Settings -> Local Policies -> User Rights Assignment, and find Logon as a Batch Job. Then, add the account in question to that policy.

Tattle answered 20/1, 2013 at 0:23 Comment(1)
Thanks this is really helpful.Pardew
I
3

If it's helpful to anyone else, I had to set the GPO to enforced for my purposes.

Insignificance answered 16/10, 2014 at 17:1 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.