Table of Contents

Class JobQueue

Namespace
ArcanaDevelopment.adTempus.Client
Assembly
ArcanaDevelopment.adTempus.Client.dll

Represents a Job Queue

public sealed class JobQueue : ADTIndependentObject, ISupportJobVariables
Inheritance
object
JobQueue
Implements

Remarks

The Default queue is always in every adTempus instance. It has an OID of DefaultQueue and IsDefaultQueue returns true. The default queue cannot be deleted.

Properties

ActiveJobs

Gets the number of active jobs for the queue.

public int? ActiveJobs { get; }

Property Value

int?

Remarks

This value is only set if the queue was fetched through GetJobTree(OID, bool, bool, bool).

AgentOptions

Options that control how this queue behaves when Distributed Scheduling is in use

public JobAgentOptions AgentOptions { get; set; }

Property Value

JobAgentOptions

Agents

The Remote Agents assigned to this queue

public QueueAgentJoinCollection Agents { get; }

Property Value

QueueAgentJoinCollection

Remarks

Jobs will be executed on the agents based on the AgentOptions settings. Jobs may also be executed on the Controller, based on RunOnController.

AllowHoldTypeOverride

Determines whether jobs in the queue can override the HoldType

public bool AllowHoldTypeOverride { get; set; }

Property Value

bool

Remarks

If AllowHoldTypeOverride is false, jobs in the queue can have a more-restrictive HoldType but not a less-restrictive HoldType. If AllowHoldTypeOverride is true, jobs can choose whether to inherit the setting from the queue (by using InheritHoldType).

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.

ExclusionPeriods

The ExclusionPeriods that apply to this Group.

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

Property Value

ExclusionPeriodCollection

Remarks

When Exclusion Periods are defined, jobs in this group (or sub-groups) do not execute during defined Exclusion Periods.

FailedJobs

Gets the number of failed jobs for the queue.

public int? FailedJobs { get; }

Property Value

int?

Remarks

This value is only set if the queue was fetched through GetJobTree(OID, bool, bool, bool).

HoldType

The hold type for the queue

public HoldType HoldType { get; set; }

Property Value

HoldType

Remarks

The queue's HoldType applies to all jobs within the queue.

See Also

IsDefaultQueue

Indicates whether this is the Default queue

public bool IsDefaultQueue { get; }

Property Value

bool

Remarks

The Default queue has DefaultQueue as its OID.

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.

JobCount

The number of jobs in the queue

public int? JobCount { get; }

Property Value

int?

Remarks

This is the total number of jobs in the queue, regardless of whether the user has permission to view them. See VisibleJobCount for the number of jobs that are visible to the user.

JobVariables

The job variables defined for the queue

public JobVariableCollection JobVariables { get; }

Property Value

JobVariableCollection

Remarks

This collection only contains the variables defined explicitly for the queue. Use GetInheritedVariables(bool) to retrieve variables inherited from the server level.

To override a variable set at a higher level, add a new variable to this collection with the same name and the desired value.

MaxConcurrentJobs

The maximum number of jobs that can run in the queue at the same time on a single adTempus server

public int MaxConcurrentJobs { get; set; }

Property Value

int

Remarks

Set to 0 for no limit.

When Distributed Scheduling is in use, this is the limit for each adTempus server (Controller or agent). Use MaxDistributedConcurrentJobs to set a limit that applies across all servers.

See Also

MaxDistributedConcurrentJobs

The maximum number of jobs that can run in this queue at the same time across all adTempus servers

public int MaxDistributedConcurrentJobs { get; set; }

Property Value

int

Remarks

Set to 0 for no limit.

When Distributed Scheduling is in use, this is the limit for all adTempus servers (Controller and agents) combined. Use MaxConcurrentJobs to set a limit that applies to each individual server.

See Also

Name

The name of the Queue.

public string Name { get; set; }

Property Value

string

Remarks

The Name must be unique. The Default queue cannot be renamed

Responses

Responses to be executed for all jobs in the Queue.

public ResponseCollection Responses { get; }

Property Value

ResponseCollection

ResubmitQueuedOnRestart

Specifies whether jobs that were queued for execution when the adTempus service shut down should be resubmitted when it restarts

public bool ResubmitQueuedOnRestart { get; set; }

Property Value

bool

Remarks

If false, queued jobs are abandoned at startup.

RunOnController

Indicates whether jobs assigned to this queue run on the Controller server

public bool RunOnController { get; set; }

Property Value

bool

SupportedResponseEvents

Gets a list of the events that are supported for Responses associated with this object.

public ReadOnlyCollection<SupportedResponseEvent> SupportedResponseEvents { get; }

Property Value

ReadOnlyCollection<SupportedResponseEvent>

SupportedSecurityActions

List of security actions supported by this object.

public override Dictionary<int, string> SupportedSecurityActions { get; }

Property Value

Dictionary<int, string>

A dictionary of the supported actions. The key is one of the SecurityPermission values and the value is the name of the permission (from GetSecurityPermissionName(SecurityPermission, string); a given SecurityPermission may use different names in different contexts).

VisibleJobCount

Gets the number of jobs in this queue (not including jobs in sub-queues) that are visible to the user, based on security settings

public int? VisibleJobCount { get; }

Property Value

int?

WarningJobs

Gets the number of jobs with warnings for the queue.

public int? WarningJobs { get; }

Property Value

int?

Remarks

This value is only set if the queue was fetched through GetJobTree(OID, bool, bool, bool).

Methods

GetEffectiveAllowHoldTypeOverride()

Gets the effective AllowHoldTypeOverride for the queue

public bool GetEffectiveAllowHoldTypeOverride()

Returns

bool

Remarks

For a JobQueue, this is currently the same as the AllowHoldTypeOverride, but this may change in the future.

GetEffectiveHoldType()

Gets the effective settings for the HoldType

public HoldType GetEffectiveHoldType()

Returns

HoldType

Remarks

For a JobQueue, this is currently the same as the HoldType, but this may change in the future.

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

NameTypeDescription
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

JobVariableCollection

GetInstanceCounts()

Gets the instance counts for the queue

public InstanceCounts GetInstanceCounts()

Returns

InstanceCounts

Remarks

This value is only set if the queue was fetched through GetJobTree(OID, bool, bool, bool)

GetJobs(ObjectFetchOptions, bool)

Gets all jobs for this Queue that the caller has permission to view.

public JobCollection GetJobs(ObjectFetchOptions options, bool refresh)

Parameters

NameTypeDescription
options ObjectFetchOptions

Options controlling the fetch operation

refresh bool

If true, the list of jobs is refreshed from the server. If false, the cached set of jobs is returned.

Returns

JobCollection

Remarks

Jobs are not initially sent from the server. The first time this method is called, they are fetched from the server (regardless of the setting of the refresh parameter). On subsequent calls to this method, the jobs are re-fetched if refresh is True.

<p>Calling this method has no effect on the set of jobs returned by GetJobsWithPaging,
and vice-versa.</p>
See Also

GetJobsWithPaging(ObjectFetchOptions, int, ref bool)

Gets jobs for the Queue, with control over how objects are returned.

public JobCollection GetJobsWithPaging(ObjectFetchOptions options, int pageSize, ref bool restartPaging)

Parameters

NameTypeDescription
options ObjectFetchOptions

Options that control how objects are returned.

pageSize int

Specfies the number of objects to return in each call. Set to 0 to return all objects. See Remarks.

restartPaging bool

On input, indicates whether to start a new paging operation (true) or continue a previous paging operation (false). On return, indicates whether all records have been returned (true) or more records remain (false). See Remarks.

Returns

JobCollection

Remarks

Paging

To fetch objects in pages (a maximum number of objects is returned in each request), set the pageSize to the maximum number requested and set restartPaging to true. On return, restartPaging will be false if there are more objects that can be fetched. To fetch the remaining pages of objects, continue to call the method, leaving restartPaging set to false, until restartPaging is true on return. At this point, all available objects have been returned.

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.

GetRequiredHoldType()

Returns the HoldType options that are required for all children of this queue.

public HoldType GetRequiredHoldType()

Returns

HoldType

Remarks

The return value is the HoldType options that are set at this level if AllowHoldTypeOverride is false.

UpdateHoldType(HoldType, MissedJobCheckOptions, ChangeLogParameters, bool?)

Updates the HoldType for the Queue immediately.

public void UpdateHoldType(HoldType newValue, MissedJobCheckOptions missedJobOptions, ChangeLogParameters auditRecord = null, bool? allowOverride = null)

Parameters

NameTypeDescription
newValue HoldType

The new setting for the object's HoldType

missedJobOptions MissedJobCheckOptions

Indicates how missed executions will be treated if the HoldType.DisableTriggers flag is being turned off.

auditRecord ChangeLogParameters

Optional audit record for change log and snapshot.

allowOverride bool?

New setting for the queue's AllowHoldTypeOverride. Set to null to keep the current setting.

Remarks

This method makes an immediate server call to update the HoldType. No Save is required. The caller must have Modify or Hold/Release permission.

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