Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm running a scheduled task (for Powershell Script) on Windows 2003 Server. I believe the script works fine. The task is scheduled to run every 10 minutes from 7:00am to 11:50pm everyday. However, it never gets to run more for than a day. It always stops some time in the afternoon (between 2pm and 6pm). I'm not sure exactly what happened but I always get the 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.

It seems like most people with this error are saying that they need to make user "logon as a batch job". However, this option is greyed-out for me. I search for other places where users have similar problems but the solutions are not written in detail (some of them have something to do with GPO). I've only used the basic features of Windows Server and I have no clue how to get to the place they are referring to.

Can someone please confirm whether "logon as a batch job" is indeed a solution and provide a detailed walkthrough on how to solve my problem?

Thanks.

p.s. someone suggested the website http://technet.microsoft.com/en-us/library/cc755659(v=ws.10) I tried to followed the method for web server with domain. However, got stuck on the 6th step where it mentions Group Policy Object. I don't know where it is.

Edit: After changing the "Run as" field and its password, the script doesn't stop running anymore. Not exactly sure what happened there, but according to one of my co-workers it seems like the there's some interference with the account that I previously used that caused the script to stop running. However, it's not writing any logs (my script writes logs) in the specified location anymore. I made sure that all paths I used in the script are absolute paths.

share|improve this question
    
Something doesn't make sense. Logon as a batch job is binary - set or not. If the job runs at the beginning of the day, it should run throughout the day. –  uSlackr Jul 13 '12 at 21:07
    
Two things - one, is the task still running when a recurring instance tries to start up? Two, what do the scheduled task logs (not event logs, you can have scheduled tasks run their own logs) say ? Have it log to a file, and check the error code when it fails. –  HopelessN00b Jul 15 '12 at 13:36

1 Answer 1

To set the Logon as a Batch job user right, go to Settings, Control Panel, Administrative Tools, Local Security Settings.

Open the Local Policies folder and select User Rights Assignment.

Find Logon as a Batch job in the right-hand pane. Double click to edit and click Add a User.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.