Table of Contents

Class TimeCriterion

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

Rule that specifies the time(s) at which a job will execute

public sealed class TimeCriterion : ADTObject
Inheritance
object
TimeCriterion

Remarks

A TimeCriterion is assigned to a Schedule (see TimeCriterion.

A TimeCriterion can only be assigned to a single Schedule; TimeCriterion objects cannot be shared.

Properties

AllowEarlyStart

Determines whether the job can start early when the StartWithin period is set

public bool AllowEarlyStart { get; set; }

Property Value

bool
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.

CriterionType

Specifies the type of criterion.

public TimeCriterionType CriterionType { get; set; }

Property Value

TimeCriterionType

Remarks

When CriterionType is Interval the IntervalType and Interval specifies the fixed interval at which the job should trigger. The first execution occurs at the StartTime if specified, or at 12:00am if StartTime is not set, and continues up until the EndTime if specified, or 11:59pm if EndTime is not set.

When CriterionType is SpecifiedTimes the Times collection specifies the times when the job should trigger.

EndTime

The latest time at which execution should occur, when CriterionType is Interval

[ComVisible(false)]
public DateTime? EndTime { get; set; }

Property Value

DateTime?

Interval

The interval at which to execute

public int Interval { get; set; }

Property Value

int

Remarks

The interval unit depends on the IntervalType

See Also

IntervalType

The unit to use when calculating the Interval

public DayTimeInterval IntervalType { get; set; }

Property Value

DayTimeInterval

Remarks

Only Minute and Hour are valid values in this context.

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.

Schedule

The Schedule to which this criterion is assigned, if any

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

Property Value

Schedule

Remarks

To assign the criterion to a schedule, set the TimeCriterion to the Schedule. A TimeCriterion can only be assigned to one Schedule; criteria cannot be shared with multiple schedules.

StartTime

The first time that the job should execute, when CriterionType is Interval

[ComVisible(false)]
public DateTime? StartTime { get; set; }

Property Value

DateTime?

StartWithin

Specifies a window of time within the job should start.

public TimeSpan StartWithin { get; set; }

Property Value

TimeSpan

Remarks

If StartWithin is System.TimeSpan.Zero (the default) adTempus starts the job as close to the exact scheduled start time as possible. If StartWithin is set to a positive value, it indicates that the job should start within StartsWithin seconds of the scheduled execution time. adTempus will randomly select a start time within that window. If AllowEarlyStart is True, the job may start up to StartWithin seconds before the specified start time.

Times

The times when the job should run, when CriterionType is SpecifiedTimes

public ICollection<DateTime> Times { get; }

Property Value

ICollection<DateTime>

Remarks

On the time portion of the values is used; the date portion can be set to any date.

Duplicate times do not cause duplicate execution.

Methods

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.

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