How do I use or configure caWmiAgent to monitor a Scheduled Job or Task in Windows?
search cancel

How do I use or configure caWmiAgent to monitor a Scheduled Job or Task in Windows?


Article ID: 54810


Updated On:


CA Workload Automation AE - Business Agents (AutoSys) CA Workload Automation AE - Scheduler (AutoSys) Workload Automation Agent CA Unicenter NSM



The caWmiAgent can be used to monitor Windows WMI Resources, such as files, scheduled tasks, processes, and so forth. You must first identify those jobs that were created using the AT command, and then add a watcher in Agent Technology. For more information about the agent-specific options of caWmiAgent, see the guide Inside Systems Monitoring , which you can find either on the product media or online at


You can configure caWmiAgent to monitor Windows Scheduled Jobs if the jobs or tasks are created using AT command.

Note: If a Task was created manually from Control Panel -> Scheduled Tasks, the WMI agent cannot recognize it. See below for information on how to monitor the status of these tasks.

To run a WMI query to see all the Scheduled Jobs

  1. From the Desktop, select Start,
    The Run dialog appears.

  2. Enter WBEMTest and click OK.
    The Windows Management Instrumentation Tester window appears.

  3. Click Connect.
    The Connect window appears.

    <Please see attached file for image>

    Figure 1

  4. Enter the following for the first field Namespace and then click Connect:
    The Windows Management Instrumentation Tester appears again.

    <Please see attached file for image>

    Figure 2

  5. Under the IWbemServices section, click Query.
    The Query dialog appears.

    <Please see attached file for image>

    Figure 3

  6. Enter the following WMI Query to list all Scheduled Jobs/Tasks
    select * from Win32_ScheduledJob

  7. Click Apply.
    The query displays all the Jobs that were created using AT command only.

    <Please see attached file for image>

    Figure 4

To monitor the Status of a Job created using the AT command


  2. Double-click cawmicnf.exe, enter ?Username = caunint' and provide the password.

  3. Launch Agent View for WMI Agent from the 2D Map, from Management Command Center (MCC), or from Node View.

  4. From the WMI Watcher interface, click Add Watcher.

  5. Enter the following details, and then click Apply to finish.
Watcher NameTestJob
Class NameWin32_ScheduledJob
Where ClauseJobId=7
(Specifies the JobId you want to monitor)
Property NameJobStatus
(Click Property List to select a Property)
ExistsShould Exist
(Action: Down Critical)
String MatchSuccess
(Action: Down Critical)

Note: String Match indicates the WMI property value which is returned by the WQL query.

<Please see attached file for image>

Figure 5

The Watcher will query against ?JobId=7? (example: select JobStatus from Win32_ScheduledJob where JobId=7). If the Watcher returns Success (Job Status is Success), then the Watcher status will be Normal; if the Watcher returns Fail, then the Watcher status will show Critical status.

To monitor Scheduled Jobs created from Control Panel -> Scheduled Tasks

Scheduled Jobs or Tasks created manually cannot be found by WMI. Therefore, the caWmiAgent cannot monitor a Job property such as Status. However, Microsoft's Scheduled Tasks writes its results to a file : %SystemRoot%\SchedLgU.Txt.

With this text file you can use the Log Agent (caiLogA2) to monitor that file for certain job failures or errors.

For more information about how to use the Log Agent, see the chapter Monitoring System Resources in Inside Systems Monitoring.


Release: TNGEXO05500-11.1-Management-for Microsoft Exchange


1558712093760000054810_sktwi1f5rjvs16shk.gif get_app
1558712091977000054810_sktwi1f5rjvs16shj.gif get_app
1558712089649000054810_sktwi1f5rjvs16shi.gif get_app
1558712087701000054810_sktwi1f5rjvs16shh.gif get_app
1558712085357000054810_sktwi1f5rjvs16shg.gif get_app