Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Scheduled tasks only run if using credentials of logged on user.

Status
Not open for further replies.

ketelec

MIS
Nov 24, 2002
7
US
Greetz all. Anyone in here want to save me from going nuts?

After standalone Windows XP boots, only Scheduled Tasks that run in the context of the currently logged on user complete successfully. Any task not using the credentials of the logged on user fail with "Result: The task completed with an exit code of (80)." However, if the Task Scheduler service is restarted manually all scheduled tasks (including tasks using credentials other than those of the logged on user) complete successfully (exit code 0).

Thought initially that there might have been some startup process conflict inteferring with the service. So, deleted all tasks except one and manually ran it after a re-boot. The task, "test.cmd", has one line: "echo task ran > %0\..\flag.txt" which creates a file if the task ran ok. So after a few tests I now know that:

Disabling all Startup items has no effect.
Disabling all non-Microsoft services has no effect.

The only service dependency is "Remote Procedure Call (RPC)" and since the Task Scheduler service always starts I guess there are no more. Yet something is different between the service state at boot time and the state after a manual service restart. Task Scheduler's running as Local System (Interactive) which should be ok. So, what's going on?

BTW: Cannot replicate the problem on W2K.
 
Scheduled Tasks Matrix
==============================

Matrix shows task fail/succeed outcomes for various combinations of logged on user and Task Scheduler service start strategies.

All users are administrators
X = Fail, / = Succeed
[tt]
Logged Service Service started in Service started in
On User AutoStart current user session earlier user session
-----------------------------------------------------------------
Creator X / X
Run As / / /
Other X / X
[/tt]

It's clear that for Scheduled Tasks to run successfully (regardless of who is logged on) the Task Scheduler service must be started in the interactive session that coincides with the tasks scheduled run time. That is, it must be started by the user logged on at the time the task is due to run. Can this be by design?

K
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top