Class JobControlAction
- Namespace
- ArcanaDevelopment.adTempus.Client
- Assembly
- ArcanaDevelopment.adTempus.Client.dll
Action to control the execution of the current job or another job
public sealed class JobControlAction : ResponseAction, ISupportJobVariables
- Inheritance
-
objectJobControlAction
- Implements
Properties
ActionOptions
public JobControlActionOptions ActionOptions { get; set; }
Property Value
AuthorizationToken
An authorization token authorizing execution of the target job.
public string AuthorizationToken { get; set; }
Property Value
- string
Remarks
See the discussion in AuthorizingLoginOID.
- See Also
AuthorizingLoginOID
The OID of the SecurityLogin with permission to run the target job.
public OID AuthorizingLoginOID { get; set; }
Property Value
Remarks
If the target job is another job, you must store the identity of a login with permission to execute that job (the AuthorizingLoginOID) and an AuthorizationToken generated by the server.
To generate the authorization token, call Scheduler.SignDelegationToken with action "RunJob" and pass the job's
ObjectID as the targetObject. The value returned by the server should be saved as the AuthorizationToken. If the
TargetJob is on another computer (TargetComputer is set), SignDelegationToken must be called on a Scheduler session
connected to the remote computer.
- See Also
Checkpoint
The checkpoint to pass to the target job
public string Checkpoint { get; set; }
Property Value
- string
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.
ControlType
The type of control action to perform
public JobControlActionType ControlType { get; set; }
Property Value
ExecutionDelay
Delays execution of the target job by the specified time
public TimeSpan ExecutionDelay { get; set; }
Property Value
- TimeSpan
Remarks
Use this option to wait before a restart or run action. The behavior depends on the ControlType:
| RunJob | Execution of the current job continues immediately. The target job is queued with a status of "Waiting for delay" with the ScheduledStart set to the delayed start time. The Console will show the delayed start time as the "Execution Start" time for the queued instance. |
| RestartJob, RestartStep | Setting a delay blocks execution of the current job/step from continuing until the delay elapses. |
| All other ControlTypes | The delay is ignored |
ExecutionOptions
Options that control how the target job is executed
public JobExecutionOptions ExecutionOptions { get; set; }
Property Value
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.
JobVariables
Sets new or overridden Job Variables to be passed to the target job
public JobVariableCollection JobVariables { get; }
Property Value
RetryLimit
Maximum number of times to retry a restart of the current job or step
public int RetryLimit { get; set; }
Property Value
- int
Remarks
This option is only used when ControlType is RestartJob or RestartStep.
If a job or step is restarted by an action and then triggers a restart again, the retry count is incremented and checked against this limit. If the retry count exceeds the limit, the action is skipped and the job/step is not restarted again.
Set to 0 for no limit. The first restart is retry 1, so setting a RetryLimit of 1 means the target job will only be restarted once. Setting the RetryLimit to 2 means it will be restarted, and then restarted one more time if the action is triggered again. The limit only applies within the current instance of the job/step.
TargetComputer
Specifies the computer where the target job is located, if other than the computer where the current job runs
public string TargetComputer { get; set; }
Property Value
- string
TargetJob
The job to control
public Job TargetJob { get; set; }
Property Value
Remarks
Set to null if the action operates on the current job.
When TargetServerID is set, the TargetJob may be null. In that case you can obtain the identity and name from the TargetJobOID and TargetJobName. If you need a reference to the job, you must make a separate connection to the TargetComputer and retrieve the job.
If the target job is on a different adTempus instance, setting TargetJob automatically sets the TargetJobOID, TargetServerID, and TargetComputer.
TargetJobName
The name of the target job. Stored only when the target job is on a remote computer.
public string TargetJobName { get; set; }
Property Value
- string
Remarks
The name is only stored so that it can be displayed to users in the description of the action. The TargetJobOID is what is actually used to locate the job. If the job is renamed on the target server, the TargetJobName is not automatically updated, but the action will still link to the correct job.
TargetJobOID
The OID of the target job.
public OID TargetJobOID { get; set; }
Property Value
- See Also
TargetServerID
The adTempus instance ID for the target computer. Required if cref="TargetComputer"/> is set.
[ComVisible(false)]
public Guid? TargetServerID { get; set; }
Property Value
- Guid?
Remarks
This value can be obtained from InstanceID in the session connected to the remote computer.
Do not set this value for a local action (when TargetComputer is not set).
TargetStepOID
The OID of the target job step
public OID TargetStepOID { get; set; }
Property Value
Methods
GetActionDescription()
protected override string GetActionDescription()
Returns
- string
GetInheritedVariables(bool)
Gets a collection containing the JobVariables inherited by this object, and optionally the variables for the object itself.
public JobVariableCollection GetInheritedVariables(bool includeSelf)
Parameters
| Name | Type | Description |
|---|---|---|
includeSelf |
bool | If true the returned collection contains both inherited variables and variables defined at this level. If false the results only include inherited variables. |
Returns
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
- ResponseAction.Sequence
- ResponseAction.Enabled
- ResponseAction.UserInterfaceExtensionID
- ResponseAction.UserInterfaceExtensionData
- ResponseAction.DescriptionOverride
- ResponseAction.Name
- 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)