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:
- Start –> All Programs –> Accessories –> System Tools –> Scheduled Tasks
- 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:
0×80070569: 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:
- Control Panel –> Administrator Tools –> Local Security Policy –> Local Policies –> User Rights Assignment –> Log on as a batch job
- Right-click –> Properties
- This lists the users and groups that have rights to run batch jobs.
To add the user to the Backup Operators group:
- Control Panel –> Administrator Tools –> Computer Management –> Local Users And Groups –> Groups –> Backup Operators
- Add…
- Add the user that is set for the scheduled tasks.
Additional steps for a full reset of the scheduler:
- Go into Services and STOP Task Scheduler and then DISABLE it.
- Go to your Windows folder and delete SCHEDLGU.TXT (I could be off a letter or two on that filename).
- Now set Task Scheduler back to AUTOMATIC and START it.
References: