Code: --------- if not exist %windir%\tasks\CleanUpUtility.job schtasks /create /tn "CleanUpUtility" /d mon,wed,thu,fri,sat,sun /sc weekly /st 17:00:00 /tr "cleanmgr /sagerun:1" /ru system > nul --------- My objective here is to set up...
Code:
if not exist %windir%\tasks\CleanUpUtility.job schtasks /create /tn "CleanUpUtility" /d mon,wed,thu,fri,sat,sun /sc weekly /st 17:00:00 /tr "cleanmgr /sagerun:1" /ru system > nul
My objective here is to set up 'CleanUpUtility' job run as 'NT AUTHORITY\SYSTEM' which do not require password, save it as Scheduler.cmd and run that script from GPO. It worked on most workstations (250+) but 20 workstations wouldn't work.
The error is:
Run As User: Could not be retrieved from the task scheduler database
I know there are something in those 20 workstations that need to be configured to get that script to work. I've been looking, googled endlessly, pulling my hair out of my skull to no avail.
Those 20 workstations are no exception, they are member of Domain (Windows 2003 R2), just like others and are in same OU's amongst other 250+ workstations.
Here is the query output from problematic workstation:
Code:
C:\Documents and Settings\shamm>schtasks /query /s s50-1485 /fo list /v
HostName: s50-1485
TaskName: CleanUpUtility
Next Run Time: 17:00:00, 2/9/2009
Status: Could not start
Last Run Time: 17:00:21, 2/2/2009
Last Result: 0
Creator: SYSTEM
Schedule: At 5:00 PM every Mon, Wed, Thu, Fri, Sat, Sun of every week, starting 2/1/2009
Task To Run: cleanmgr /sagerun:1
Start In: cleanmgr
Comment: N/A
Scheduled Task State: Enabled
Scheduled Type: Weekly
Start Time: 17:00:00
Start Date: 2/1/2009
End Date: N/A
Days: SUNDAY,MONDAY,WEDNESDAY,THURSDAY,FRIDAY,SATURDAY
Months: N/A
Run As User: Could not be retrieved from the task scheduler database
Delete Task If Not Rescheduled: Enabled
Stop Task If Runs X Hours and X Mins: 72:0
Repeat: Every: Disabled
Repeat: Until: Time: Disabled
Repeat: Until: Duration: Disabled
Repeat: Stop If Still Running: Disabled
Idle Time: Disabled
Power Management: Disabled
And here is the query output from workable workstation:
Code:
C:\Documents and Settings\shamm>schtasks /query /s s1625 /fo list /v
HostName: s1625
TaskName: CleanUpUtility
Next Run Time: 17:00:00, 2/9/2009
Status:
Last Run Time: 17:00:00, 2/6/2009
Last Result: 0
Creator: SYSTEM
Schedule: At 5:00 PM every Mon, Wed, Thu, Fri, Sat, Sun of every week, starting 2/2/2009
Task To Run: cleanmgr /sagerun:1
Start In: cleanmgr
Comment: N/A
Scheduled Task State: Enabled
Scheduled Type: Weekly
Start Time: 17:00:00
Start Date: 2/2/2009
End Date: N/A
Days: SUNDAY,MONDAY,WEDNESDAY,THURSDAY,FRIDAY,SATURDAY
Months: N/A
Run As User: NT AUTHORITY\SYSTEM
Delete Task If Not Rescheduled: Enabled
Stop Task If Runs X Hours and X Mins: 72:0
Repeat: Every: Disabled
Repeat: Until: Time: Disabled
Repeat: Until: Duration: Disabled
Repeat: Stop If Still Running: Disabled
Idle Time: Disabled
Power Management: Disabled
I don't see any difference between those two computers. ALL workstations are running Windows XP SP 3.
Any ideas?