Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am having the following problem.

I am running a Windows NT server. I need to monitor the server utilization continuously (automated process) and need to know if the server load is high. And if it high I need to trigger a scheduled task.

Can we write a VB script in order to do this?

Can someone please help me?

Kindly let me know in case you require more info on this


share|improve this question

You can use a short vbs script like this one to launch a scheduled task if the proc load is above 90. You can shedule it using cscript /nologo script.vbs:

On Error Resume Next

Dim objProc
Set objProc = GetObject("winmgmts:root\cimv2:win32_processor='cpu0'")

If objProc.LoadPercentage > 90 Then
    Set objTaskService = CreateObject("Schedule.Service")
    Set objRootFolder = objTaskService.GetFolder("\")
    Set objTask = objRootFolder.GetTask("YOUR_TASK_NAME")
    objTask.Run vbNull
End If

Set objProc = Nothing

Hope this helps

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.