Table of Contents

Class ExecutionHistoryItem

Namespace
ArcanaDevelopment.adTempus.Client
Assembly
ArcanaDevelopment.adTempus.Client.dll
[ComVisible(true)]
[Guid("a4b2363b-b6ce-4d40-b4e5-64272802275d")]
public sealed class ExecutionHistoryItem : ADTObject
Inheritance
object
ExecutionHistoryItem

Properties

AgentOID

The OID of the Agent this instance ran on

public OID AgentOID { get; }

Property Value

OID

Remarks

Will be null if the instance did not run on an Agent.

AgentWaitEndTime

The date/time the job finished waiting to be dispatched to an Agent

[RequiredVersion(5, 0, 0, 0)]
public DateTimeOffset? AgentWaitEndTime { get; }

Property Value

DateTimeOffset?

Remarks

Will be null if the job does not run on agents.

AgentWaitStartTime

The date/time the job started waiting to be dispatched to an Agent

[RequiredVersion(5, 0, 0, 0)]
public DateTimeOffset? AgentWaitStartTime { get; }

Property Value

DateTimeOffset?

Remarks

Will be null if the job does not run on agents.

AgentWaitTime

Time spent waiting for an Agent to be available

public TimeSpan? AgentWaitTime { get; }

Property Value

TimeSpan?

Remarks

This is the elapsed between AgentWaitStartTime and AgentWaitEndTime, or between AgentWaitStartTime and the current time if the instance is still waiting for an Agent.

The value will be null if the job did not run on an Agent or the times were not recorded

CallingInstanceOID

The OID of the job instance that called this instance, if any.

public OID CallingInstanceOID { get; }

Property Value

OID
See Also

CapturedFiles

The files captured by this instance

public CapturedFileCollection CapturedFiles { get; }

Property Value

CapturedFileCollection

Remarks

This collection contains files captures at the instance level (not associated with a step) and also those associated with a step.

Files are ordered by step number and file name.

ChainID

A unique ID value linking all instances that are part of the same execution chain.

public string ChainID { get; }

Property Value

string

Remarks

All jobs linked together through Responses will have the same ChainID.

See Also

ClassID

The Class ID for the object

[IgnoreDataMember]
public override ClassID ClassID { get; }

Property Value

ClassID

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.

Comments

User-entered comments for this instance.

public string Comments { get; }

Property Value

string

Remarks

This property is read-only. Use SetComments(string) to set the comments.

ComputerName

The name of the computer where the instance executed.

public string ComputerName { get; }

Property Value

string

ConditionStatuses

A collection of ConditionStatus objects showing the status of each Condition for this instance

public ConditionStatusCollection ConditionStatuses { get; }

Property Value

ConditionStatusCollection

ConditionWaitEndTime

The date/time the job finished waiting for conditions

[RequiredVersion(5, 0, 0, 0)]
public DateTimeOffset? ConditionWaitEndTime { get; }

Property Value

DateTimeOffset?

Remarks

Will be null if the job has no conditions.

ConditionWaitStartTime

The date/time the job started waiting for conditions

[RequiredVersion(5, 0, 0, 0)]
public DateTimeOffset? ConditionWaitStartTime { get; }

Property Value

DateTimeOffset?

Remarks

Will be null if the job has no conditions.

ConditionWaitTime

Time spent waiting for conditions to be met

public TimeSpan? ConditionWaitTime { get; }

Property Value

TimeSpan?

Remarks

This is the elapsed between ConditionWaitStartTime and ConditionWaitEndTime, or between ConditionWaitStartTime and the current time if the instance is still waiting for conditions.

The value will be null if the job has no conditions or the times were not recorded

CurrentStepRestartCount

Indicates the number of times the current step has been restarted

public int CurrentStepRestartCount { get; }

Property Value

int

Remarks

RestartCount will be 0 for the initial execution of the step.

CurrentStepRestartLimit

The maximum number of times the step will be restarted

public int CurrentStepRestartLimit { get; }

Property Value

int

CustomProperties

Custom properties set for this object.

public override ICustomProperties CustomProperties { get; }

Property Value

ICustomProperties

Remarks

When CustomProperties are modified you must call SaveCustomProperties() to save the changes.

CycleID

The value of the CycleID for this instance

public string CycleID { get; }

Property Value

string

ElapsedTime

Time elapsed between ExecutionStart and ExecutionFinish, or between ExecutionStart and current time if instance is still active.

public TimeSpan? ElapsedTime { get; }

Property Value

TimeSpan?

ExclusionPeriod

The ExclusionPeriod that affected this instance

[RequiredVersion(5, 0, 0, 0)]
public ExclusionPeriod ExclusionPeriod { get; }

Property Value

ExclusionPeriod

ExecutionFinish

The actual finish date/time for this instance.

[ComVisible(false)]
public DateTimeOffset? ExecutionFinish { get; }

Property Value

DateTimeOffset?

ExecutionReason

The reason for the execution.

public string ExecutionReason { get; }

Property Value

string

ExecutionRequestID

Links all instances started as a result of a manual execution request.

public string ExecutionRequestID { get; }

Property Value

string

Remarks

When a job is submitted for execution using Execute(JobExecutionSettings), the ExecutionRequestID is assigned to all instances created from that request, allowing them to be found and tracked later.

ExecutionStart

The actual start date/time for this instance.

[ComVisible(false)]
public DateTimeOffset? ExecutionStart { get; }

Property Value

DateTimeOffset?

ExecutionType

The type of execution

public ExecutionType ExecutionType { get; }

Property Value

ExecutionType

InstanceID

The unique instance ID for this instance

public int InstanceID { get; }

Property Value

int

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.

IsRunning

Indicates whether the instance is currently running.

public bool IsRunning { get; }

Property Value

bool

IsWaiting

Indicates whether the instance is currently waiting

public bool IsWaiting { get; }

Property Value

bool

Remarks

Checks the Status against WaitingStatuses

Job

The job to which this item belongs.

public Job Job { get; }

Property Value

Job

Remarks

The Job may be null if it has been deleted from the server (execution history may not be deleted at the same time the job is deleted).

JobGroupName

The name of the JobGroup the Job belongs to

public string JobGroupName { get; }

Property Value

string

JobGroupOID

The OID of the JobGroup the Job belongs to

public OID JobGroupOID { get; }

Property Value

OID

JobName

The name of the job (without the Group name)

public string JobName { get; }

Property Value

string

JobOID

The OID of the job this instance belongs to

public OID JobOID { get; }

Property Value

OID

JobQueueName

The name of the JobQueue the job ran in

public string JobQueueName { get; }

Property Value

string

JobQueueOID

The OID of the JobQueue the job ran in

public OID JobQueueOID { get; }

Property Value

OID

JobSubmittedTime

The date/time the job was submitted for execution

[RequiredVersion(5, 0, 0, 0)]
public DateTimeOffset? JobSubmittedTime { get; }

Property Value

DateTimeOffset?

KernelModeTime

The total kernel mode CPU time for this instance

public TimeSpan KernelModeTime { get; }

Property Value

TimeSpan

Remarks

Processor time is only accumulated for certain task types. See the user guide for more information

LastCheckpoint

The last checkpoint reported by the job.

public string LastCheckpoint { get; }

Property Value

string

LastStepDescription

The description of the last step executed or executing.

public string LastStepDescription { get; }

Property Value

string

Remarks

This method does not return the JobStep.Description value. Rather, it returns the step Name (if present) and the system-generated description of the task.

See Also

LastStepInstanceOID

The OID of the ExecutionHistoryStep for the most recent step executed.

public OID LastStepInstanceOID { get; }

Property Value

OID

LastStepName

The name of the last step executed or executing.

public string LastStepName { get; }

Property Value

string
See Also

LastStepNumber

The step number of the step currently executing, or the last step executed if the instance is not currently executing.

public int LastStepNumber { get; }

Property Value

int

Remarks

Will be 0 if the information is not available or if no steps were executed.

LocalInstance

Indicates whether the instance executed on the connected server.

public bool LocalInstance { get; }

Property Value

bool

Remarks

When the client is connected to a Controller instance, LocalInstance will be true for instances that ran on the Controller and false for instances that ran on Agents.

LogMessages

The messages logged to the Job Log for this instance.

public LogMessageCollection LogMessages { get; }

Property Value

LogMessageCollection

Remarks

This collection will contain messages logged at both the job and step levels.

MemoryUsage

The peak working set size for the job, in KB.

public int MemoryUsage { get; }

Property Value

int

Remarks

This value will reflect the largest MemoryUsage value for all steps in the instance.

NumberOfSteps

The total number of steps in the job.

public int NumberOfSteps { get; }

Property Value

int

OriginalQueueOrder

The queue order for the instance, which can be used to reorder pending jobs that have the same priority.

public int OriginalQueueOrder { get; }

Property Value

int

Remarks

Priority

The Job.Priority for the instance.

public int Priority { get; }

Property Value

int

Remarks

PriorityOrOverride

Returns the PriorityOverride if it has a value, or the Priority otherwise.

public int PriorityOrOverride { get; }

Property Value

int

PriorityOverride

The priority override for the instance.

public int? PriorityOverride { get; set; }

Property Value

int?

Remarks

QueueAddTime

The time the instance was added to the execution queue.

public DateTimeOffset? QueueAddTime { get; }

Property Value

DateTimeOffset?

Remarks

QueueEnterTime

The date/time the job entered the execution queue

[RequiredVersion(5, 0, 0, 0)]
public DateTimeOffset? QueueEnterTime { get; }

Property Value

DateTimeOffset?

QueueLeaveTime

The date/time the job left the execution queue

[RequiredVersion(5, 0, 0, 0)]
public DateTimeOffset? QueueLeaveTime { get; }

Property Value

DateTimeOffset?

QueueOrderOverride

The queue order override for the instance, which can be used to reorder pending jobs that have the same priority.

public int? QueueOrderOverride { get; set; }

Property Value

int?

Remarks

QueueState

The queue state of an active instance.

public QueueState? QueueState { get; }

Property Value

QueueState?

Remarks

RecordID

The record ID for this instance

public int RecordID { get; }

Property Value

int

Remarks

The record ID is a unique sequential ID for the instance.

RemoteAgent

The RemoteAgent this instance is assigned to.

public RemoteAgent RemoteAgent { get; }

Property Value

RemoteAgent

Remarks

Will be null if the instance ran locally.

RestartCount

Indicates the number of times the job has been restarted in the current restart chain

public int RestartCount { get; }

Property Value

int

Remarks

RestartCount will be 0 for the initial execution of the job. If the job is restarted by a JobControlAction the RestartCount for the instance created by the restart will be 1. Subsequent restarts in the same chain will each increment the count.

RestartLimit

The maximum number of times the job will be restarted in the current restart chain

public int RestartLimit { get; }

Property Value

int

ScheduledStart

The date/time when this instance is scheduled to start, if it is in a waiting status.

[RequiredVersion(5, 0, 0, 0)]
public DateTimeOffset? ScheduledStart { get; }

Property Value

DateTimeOffset?

Remarks

ScheduledStart will return a value if the Status is WaitingForDelay or WaitingForExclusionPeriod.

Status

The current status of this instance.

public JobState Status { get; }

Property Value

JobState

StatusAcknowledged

Indicates whether the status of this instance has been acknowledged

public bool StatusAcknowledged { get; }

Property Value

bool
See Also

StatusAcknowledgedByUserName

The user ID of the user who acknowledged the status, if StatusAcknowledged is true.

[RequiredVersion(5, 0, 0, 0)]
public string StatusAcknowledgedByUserName { get; }

Property Value

string

Remarks

This value is only set if the status was acknowledged on server version 5 or later.

StatusAcknowledgedTimestamp

The date/time the status was acknowledged, if StatusAcknowledged is true.

[RequiredVersion(5, 0, 0, 0)]
public DateTimeOffset? StatusAcknowledgedTimestamp { get; }

Property Value

DateTimeOffset?

Remarks

This value is only set if the status was acknowledged on server version 5 or later.

StatusDescription

Gets the text description of the Status.

public string StatusDescription { get; }

Property Value

string

StatusMessage

Gets an additional status message for this instance

[RequiredVersion(5, 0, 0, 0)]
public string StatusMessage { get; }

Property Value

string

Steps

A collection of ExecutionHistoryStep objects that track the status of each step for this instance.

public ExecutionHistoryStepCollection Steps { get; }

Property Value

ExecutionHistoryStepCollection

TagList

A comma-delimited list of tags assigned to the instance

public string TagList { get; }

Property Value

string

TimeInQueue

Time elapsed between QueueEnterTime and QueueLeaveTime, or between QueueEnterTime and current time if instance is still queued.

public TimeSpan? TimeInQueue { get; }

Property Value

TimeSpan?

TriggerClass

The ClassID of the Trigger that caused this instance to execute

public ClassID TriggerClass { get; }

Property Value

ClassID

UserModeTime

The total user mode CPU time for this instance

public TimeSpan UserModeTime { get; }

Property Value

TimeSpan

Remarks

Processor time is only accumulated for certain task types. See the user guide for more information

Methods

AcknowledgeStatus(int)

Marks the status of this instance as Acknowledged

public void AcknowledgeStatus(int options = 0)

Parameters

NameTypeDescription
options int

Reserved for future use. Set to 0.

Remarks

Marking an instance as Acknowledged removes it from the Failed Jobs view in the Console and clears its Failed or Warning status indicator.

The caller must have Execute permission for the job.

Exceptions

PermissionDeniedException

Thrown if the caller does not have Execute permission for the job.

FindOwningObject()

Get the owner of this object based on relationships.

protected override ADTObject FindOwningObject()

Returns

ADTObject

The owning object, or null if the object is not owned by another object or the owner has not been set.

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.

OnEntityReloaded()

Called when the entity is reloaded from the server

protected override void OnEntityReloaded()

OverrideStatus(JobState)

Overrides the status of the instance to the specified newStatus

public void OverrideStatus(JobState newStatus)

Parameters

NameTypeDescription
newStatus JobState

The new status for the instance

Remarks

The caller must have Modify or Execute permission for the job.

Exceptions

PermissionDeniedException

Thrown if the caller does not have the necessary permission.

Refresh()

Reverts the object (and any contained objects) to their last-saved state, discarding any in-memory changes.

public void Refresh()

ReleaseWaitingInstance(int, string)

Forces immediate execution of an instance that is waiting for execution.

public void ReleaseWaitingInstance(int options, string reason)

Parameters

NameTypeDescription
options int

Reserved. Must be set to 0.

reason string

Optional reason for the forced execution.

Remarks

This forces the job to continue execution if it is waiting for a condition or available queue slot.

SaveCustomProperties()

Saves the CustomProperties for this instance

[RequiredVersion(5, 0, 0, 0)]
public void SaveCustomProperties()

Remarks

The caller must have Execute or Modify permission for the job.

SetComments(string)

Sets the Comments for this instance

public void SetComments(string newVal)

Parameters

NameTypeDescription
newVal string

The new comments for the instance

Remarks

The caller must have Execute or Modify permission for the job the instance belongs to.

Exceptions

PermissionDeniedException

Thrown if the caller does not have permission to set comments.

Terminate(TerminationOptions)

Terminates this instance of the job, if it is running.

public void Terminate(TerminationOptions options)

Parameters

NameTypeDescription
options TerminationOptions

WriteToConfigurationReport(IADTObjectConfigurationReportWriter)

Writes the object and any contained objects to a configuration report

public override void WriteToConfigurationReport(IADTObjectConfigurationReportWriter reportBuilder)

Parameters

NameTypeDescription
reportBuilder IADTObjectConfigurationReportWriter

The report builder to write the object to.

Inherited Members