Table of Contents

Class ExclusionPeriod

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

Represents a time period when jobs cannot run.

[RequiredVersion(5, 0, 0, 0)]
public sealed class ExclusionPeriod : ADTIndependentObject
Inheritance
object
ExclusionPeriod

Properties

ApplyToChainedExecution

Determines whether the Exclusion Period applies when the job is run as part of a chain (through a JobControlAction or JobTrigger

public bool ApplyToChainedExecution { get; set; }

Property Value

bool

ApplyToManualExecution

Determines whether the Exclusion Period applies when the job is run manually using ExecuteJob.

public bool ApplyToManualExecution { get; set; }

Property Value

bool

Remarks

This setting is ignored if IgnoreExclusionPeriods is set when running the job.

ApplyToNonScheduleTriggers

Determines whether the Exclusion Period applies to triggers other than Schedule Triggers and Job Triggers

public bool ApplyToNonScheduleTriggers { get; set; }

Property Value

bool

Remarks

This setting does not affect Job Triggers, which are controlled by ApplyToChainedExecution.

ApplyToScheduleTriggers

Determines whether the Exclusion Period applies to Schedule Triggers

public bool ApplyToScheduleTriggers { get; set; }

Property Value

bool

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.

DateCriterion

The DateCriterion defining the day(s) on which the Exclusion Period occurs.

public DateCriterion DateCriterion { get; set; }

Property Value

DateCriterion

Enabled

Determines whether the Exclusion Period is enabled

public bool Enabled { get; set; }

Property Value

bool

Remarks

If the Exclusion Period is not enabled, it will be ignored by the scheduling engine.

EndTime

The time at which the Exclusion Period ends.

public DateTime EndTime { get; set; }

Property Value

DateTime

Remarks

Only the time portion of this value is used. The DateCriterion determines the day(s) for the Exclusion Period.

If the EndTime is earlier than the StartTime the Exclusion Period spans midnight and the EndTime is the next day from the StartTime.

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.

Name

The name of the Exclusion Period. Must be unique.

public string Name { get; set; }

Property Value

string

StartTime

The time at which the Exclusion Period begins.

public DateTime StartTime { get; set; }

Property Value

DateTime

Remarks

Only the time portion of this value is used. The DateCriterion determines the day(s) for the Exclusion Period.

TimeZoneID

The ID of the time zone to use for this Exclusion Period.

public string TimeZoneID { get; set; }

Property Value

string

Remarks

If not specified, the default time zone for the server is used.

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.

GetRanges(DateTime, DateTime)

Gets a list of the date/time ranges in the specified time period that match the rules of this Exclusion Period.

public ReadOnlyCollection<DateTimeRange> GetRanges(DateTime startDateTime, DateTime endDateTime)

Parameters

NameTypeDescription
startDateTime DateTime

The starting date/time (inclusive) of the time period to check. Specify in the time zone of the adTempus server.

endDateTime DateTime

The ending date/time (inclusive) of the time period to check. Specify in the time zone of the adTempus server.

Returns

ReadOnlyCollection<DateTimeRange>

A collection of all date/time ranges within the specified time period that match the rules defined by this Exclusion Period.

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