System.SimpleScheduler

System Center

Updated: August 10, 2011

Applies To: Operations Manager 2007 R2

The System.SimpleScheduler module is a data source module type that outputs System.Discovery.Data data on a scheduled, repeating interval.

Usage

Use this module to initiate a workflow at the scheduled interval. This module supports only a simple schedule. If you would like to implement a weekly schedule, you must implement the System.Scheduler module type. Do not use this module type from within a discovery workflow. For discovery workflows, use the System.Discovery.Scheduler module type.

Type Definition


<DataSourceModuleType ID="System.SimpleScheduler" Accessibility="Public" Batching="false">
  <Configuration>
    <IncludeSchemaTypes>
      <SchemaType>System.ExpressionEvaluatorSchema</SchemaType>
    </IncludeSchemaTypes>
    <xsd:element name="IntervalSeconds" type="xsd:int"/>
    <xsd:element name="SyncTime" type="xsd:string"/>
  </Configuration>
  <OverrideableParameters>
    <OverrideableParameter ID="IntervalSeconds" ParameterType="int" Selector="$Config/IntervalSeconds$"/>
    <OverrideableParameter ID="SyncTime" ParameterType="string" Selector="$Config/SyncTime$"/>
  </OverrideableParameters>
  <ModuleImplementation Isolation="Any">
    <Composite>
      <MemberModules>
        <DataSource TypeID="System.Scheduler" ID="DS1">
          <Scheduler>
            <SimpleReccuringSchedule>
              <Interval>$Config/IntervalSeconds$</Interval>
              <SyncTime>$Config/SyncTime$</SyncTime>
            </SimpleReccuringSchedule>
            <ExcludeDates/>
          </Scheduler>
        </DataSource>
      </MemberModules>
      <Composition>
        <Node ID="DS1"/>
      </Composition>
    </Composite>
  </ModuleImplementation>
  <OutputType>System.TriggerData</OutputType>
</DataSourceModuleType>

Parameters

System.SimpleScheduler supports the configuration parameter described in the following table.

 

Parameter Type Overrideable Description

IntervalSeconds

Integer

True

Required parameter. The recurring interval of time in seconds in which to run the script.

SyncTime

String

True

Required parameter. The synchronization time specified by using a 24-hour format. If you do not want to specify a synchronization time, you can include the element, but without any value (for example, <SyncTime/>).

For more information about the IntervalSeconds and SyncTime parameters of this module, see PublicSchedulerType.

Composition

The System.SimpleScheduler module is a composite module that contains the member module described in the following table.

 

Workflow Run Order Module Type Usage

1

System.Scheduler

Outputs System.Discovery.Data data on a scheduled, repeating interval.

Related Modules

 

Module Type Usage

System.Discovery.Scheduler

Outputs System.Discovery.Data data on a scheduled, repeating interval. Used in discoveries only.

External Module References

The System.SimpleScheduler module is a member of the public module described in the following table.

 

Module Type Library Usage

Microsoft.Windows.WmiProvider

Microsoft.Windows.Library

Used for scheduled scripts that output data that is mapped to an event and stored in the Operations Manager databases.

Sample

The following XML sample shows a rule that runs on a schedule and executes a script. The script logs an event to the Operations Manager event log when the script completes.


<Rule ID="Microsoft.Samples.ExecuteTestScript" Enabled="true" Target="Microsoft.Samples.ApplicationX" >
  <Category>Custom</Category>
  <DataSources>
    <DataSource ID="Scheduler" TypeID="System!System.Scheduler">
      <IntervalSecinds>300</Interval>
      </SyncTime>
    </DataSource>
  </DataSources>
  <WriteActions>
    <WriteAction ID="Script" TypeID="Windows!Microsoft.Windows.ScriptWriteAction">
      <ScriptName>Microsoft.Samples.LogOpsMgrEvent.vbs</ScriptName>
      <Arguments/>
      <ScriptBody>
        Option Explicit
        Dim OMAPI
        Set OMAPI = CreateObject("MOM.ScriptAPI")
        Call OMAPI.LogScriptEvent("Microsoft.Samples.LogOpsMgrEvent",101,0,"Script Executed")
      </ScriptBody>
      <TimeoutSeconds>30</TimeoutSeconds>
    </WriteAction>
  </WriteActions>
</Rule>


Information

 

   

Module Type

DataSourceModuleType

InputType

None

Output Type

System.TriggerData

Implementation

Native

Library

System.Library

 
Show: