Class ScriptExecutionTask
- Namespace
- ArcanaDevelopment.adTempus.Client
- Assembly
- ArcanaDevelopment.adTempus.Client.dll
public sealed class ScriptExecutionTask : Task
- Inheritance
-
objectScriptExecutionTask
Remarks
To execute a Script stored in adTempus, set the Script property. To execute a script stored in an external file, set the ScriptFile and ScriptFileLanguage.
Properties
CaptureOutput
Indicates whether the output from the script should be saved as a CapturedFile in the job history.
public bool CaptureOutput { get; set; }
Property Value
- bool
Remarks
Output can be captured only for PowerShell scripts. This option is ignored for other scripts.
ClassID
The Class ID for the object
[IgnoreDataMember]
public override ClassID ClassID { get; }
Property Value
ClassKeyName
The key name for the class.
public override string ClassKeyName { get; }
Property Value
- string
Remarks
This name the name used by adTempus to identify the class and is intended for programmatic use only. Use the ClassName for a user-friendly name.
CommandLineParameters
Specifies the command-line parameters (arguments) to pass to the script.
public string CommandLineParameters { get; set; }
Property Value
- string
ExitCodeCriterion
The rule to apply to the process exit code when SuccessCriterion is ExitCode
public ExitCodeTestType ExitCodeCriterion { get; set; }
Property Value
- See Also
IsDependent
Indicates whether the object is a dependent of (owned by) another object
[IgnoreDataMember]
public override bool IsDependent { get; }
Property Value
- bool
Remarks
An independent object (IsDependent is false) is an object that can exist on its own without being part of another object. For example, Jobs, Job Groups, etc.
A dependent object (IsDependent is true) is a part of another object. For example, a JobStep cannot exist independently of a Job, so the JobStep is dependent.
Dependent objects cannot be directly fetched from the server: they are only fetched as part of the object they belong to. They also cannot be saved or deleted independently: they are automatically saved or deleted when the owning object is saved or deleted.
MaxRunTime
The maximum time (in seconds) this task is allowed to run
public int MaxRunTime { get; set; }
Property Value
- int
Remarks
Set to 0 (the default) for no limit. If the task exceeds the MaxRunTime, adTempus terminates it.
RunIsolated
Determines whether this script should run isolated from other scripts
public bool RunIsolated { get; set; }
Property Value
- bool
Remarks
If RunIsolated is true, this script will be run in a separate host process from other scripts. If false, the script may be run in the same host process as other scripts being run for the same user.
If Script is set and RunIsolated is true, that setting takes precedence and the script is run isolated.
Script
The script to execute
public Script Script { get; set; }
Property Value
Remarks
You must set either Script or ScriptFile
ScriptFile
The path and filename of the external script to execute.
public string ScriptFile { get; set; }
Property Value
- string
Remarks
The file must be a valid script for the specified ScriptFileLanguage.
You must set either ScriptFile or Script
ScriptFileLanguage
The language of the ScriptFile
public string ScriptFileLanguage { get; set; }
Property Value
- string
SuccessCodeRange
The range(s) of exit codes to use if ExitCodeCriterion is InRange or NotInRange
[RequiredVersion(5, 0, 0, 0)]
public string SuccessCodeRange { get; set; }
Property Value
- string
Remarks
This must be a list of exit codes in the form
1,2-8,12,15-17,23
.
SuccessCriterion
The rule that adTempus uses to determine whether the script was successful
public SuccessCriterion SuccessCriterion { get; set; }
Property Value
SuccessMaxCode
The maximum (inclusive) exit code that represents success when ExitCodeCriterion is BT
public int SuccessMaxCode { get; set; }
Property Value
- int
Remarks
The SuccessMaxCode is only used for BT. For all other test types use SuccessMinCode.
SuccessMinCode
The minimum (inclusive) or single exit code that represents success
public int SuccessMinCode { get; set; }
Property Value
- int
Remarks
When ExitCodeCriterion is BT the SuccessMinCode represents the minimum value (inclusive) of the range that represents success. For all other test types, the SuccessMinCode is the value that is compared against.
SupportedResponseEvents
Gets a list of the events that are supported for Responses associated with this task.
public override ReadOnlyCollection<SupportedResponseEvent> SupportedResponseEvents { get; }
Property Value
- ReadOnlyCollection<SupportedResponseEvent>
Methods
GetObjectDescription()
Gets a description of the object's key settings.
protected override string GetObjectDescription()
Returns
- string
Remarks
This method is called by GetDescription() to get a user-friendly description of the object (such as its key settings) for display to the user. The description should contain enough information to distinguish this object from others of the same class.
WriteToConfigurationReport(IADTObjectConfigurationReportWriter)
Writes the object and any contained objects to a configuration report
public override void WriteToConfigurationReport(IADTObjectConfigurationReportWriter reportBuilder)
Parameters
| Name | Type | Description |
|---|---|---|
reportBuilder |
IADTObjectConfigurationReportWriter | The report builder to write the object to. |
Inherited Members
- Task.UserInterfaceExtensionID
- Task.UserInterfaceExtensionData
- Task.DescriptionOverride
- Task.JobStep
- ADTObject.LastModified
- ADTObject.CreationTimestamp
- ADTObject.FromController
- ADTObject.CustomProperties
- ADTObject.Description
- ADTObject.DescriptionTextType
- ADTObject.OID
- ADTObject.BindingDescription
- ADTObject.ToString()
- ADTObject.ParentObject
- ADTObject.CanPerform(SecurityPermission)
- ADTObject.Duplicate()
- ADTObject.DataContext
- ADTObject.AccessMask
- ADTObject.Validate(MessageCollection)
- ADTObject.SupportedSecurityActions
- ADTObject.SupportedSecurityInheritanceOptions
- ADTObject.GetTopLevelOwner()
- ADTObject.GetConfigurationReport()
- ADTObject.GetConfigurationReport(bool)
- ADTObject.IsReadOnly
- ObjectBase.IsDirty
- ObjectBase.IsNew
- ObjectBase.IsStub
- ObjectBase.ClassName
- ObjectBase.GetDescriptionWithClassName()
- ObjectBase.GetDescription()
- ObjectBase.BeginEdit()
- ObjectBase.BeginEdit(UndoLevelAction)
- ObjectBase.CommitEdit(Guid)
- ObjectBase.CommitEdit()
- ObjectBase.UndoEdit()
- ObjectBase.UndoEdit(Guid)