Home > System Admin, Windows > Windows XP – Scheduled Tasks stop working

Windows XP – Scheduled Tasks stop working

December 15, 2009

I use Scheduled Tasks in Windows XP to kick off automated processes.  On one particular machine, everything worked fine for several years until recently the scheduled tasks would no longer start.

Checking the Scheduled Tasks’ properties, the user account was still configured correctly with the correct password.

Checking the Scheduled Tasks’ log in:

  1. Start –> All Programs –> Accessories –> System Tools –> Scheduled Tasks
  2. Menu: Advanced –> View Log.

the log contained the following info [edited] for my scheduled job:

“nightly.job” (nightly.bat) 1/1/2009 9:00:00 PM ** 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 turns out that the user that is assigned to a scheduled task, must also be assigned to the “Log on as a batch job” account policy. 

Normally, on a local machine, if you add a user to a scheduled task, then that user will automatically be added to the policy.  However; if your machine is connected to a domain, then the domain settings may periodically overwrite the local account policies.

In order to fix the scheduled tasks, I needed to add my user back into the “Log on as a batch job” policy.  However, since the domain controls the policy I had to add my user to the local “Backup Operators” group so that the policy would once again apply.

To view the “Log on as a batch job” Policy:

  1. Control Panel –> Administrator Tools –> Local Security Policy –> Local Policies –> User Rights Assignment –> Log on as a batch job
  2. Right-click –> Properties
  3. This lists the users and groups that have rights to run batch jobs.

To add the user to the Backup Operators group:

  1. Control Panel –> Administrator Tools –> Computer Management –> Local Users And Groups –> Groups –> Backup Operators
  2. Add…
  3. Add the user that is set for the scheduled tasks.

References:

Advertisements
Categories: System Admin, Windows
%d bloggers like this: