CScheduledTask.MaintenanceTriggers

From ReliaWiki
Revision as of 21:55, 24 June 2016 by Kate Racaza (talk | contribs) (Created page with '{{Template:API}}{{Template:APIBreadcrumb|.cScheduledTask}} <onlyinclude>Gets or sets the value of the maintenance trigger assigned to the task. '''Inte…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
APIWiki.png


Member of: SynthesisAPI.cScheduledTask


Gets or sets the value of the maintenance trigger assigned to the task. Integer. Can be any value from the TaskMaintenanceTriggerEnum enumeration or the sum of any combination of values from the enumeration (this allows you to get or set more than one trigger). Default value = 0 (no triggers)

For example, to trigger a task when a corrective maintenance (enum value = 2) or preventive maintenance (enum value = 4) starts, set the value of the MainentanceTriggers property to 6 (i.e., 2 + 4 = 6).

Alternatively, you can set a combination of triggers by using the logical Or operator. For example, the following code sets two triggers:

VB.NET

  Dim t As New cScheduledTask  
  'Set the property  
  t.MaintenanceTriggers = TaskMaintenanceTriggerEnum.BlockFails Or TaskMaintenanceTriggerEnum.BlockRestored