I'm running a script that loops through all the scheduled jobs on a server and checks to see which jobs are running by a certain user and then makes sure they're not hanging processes. Basically out there idle for over 15 minutes.
Anyway, it starts fine and runs through the processes quite nicely for about an hour then it errors out with the following error:
SWbemObjectEx (49, 4) : Not found
[highlight=vb]
Set sProcessList = oProcess.ExecQuery ("Select * from Win32_Process")
sMsg = ""
If sProcessList.Count > 0 Then
For each iProcess in sProcessList
iReturn = iProcess.GetOwner '<--- This is the line it errors on
[/highlight]I'm not sure why it's doing that as for a while it runs fine with no errors.



LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks