Table of Contents

Class DaySpecification

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

Defines the day(s) on which a job will execute, by specifying a specific date or a rule to determine the date.

[ComVisible(true)]
[Guid("30d28de4-7ce6-4a81-92c4-9860144ca3e1")]
public sealed class DaySpecification : ADTObject
Inheritance
object
DaySpecification

Remarks

The SpecificationType property determines how the specification behaves, and which properties must be set. The following table explains the valid settings.

SpecificationTypeOther Settings Required
SpecifiedDays Select the appropriate Months and Days.
SpecifiedWeekdaysSelect the appropriate Months and Weekdays.
FloatingOffsetSelect the appropriate Months and Weekdays. Select the Occurrence and optionally an Offset. To calculate the date relative to another DaySpecification (instead of relative to the beginning of the month) set the OccurrenceBase and the RelativityType.
EndOfMonthOffsetSelect the appropriate Months and specify an Offset.
EasterOffsetSpecify an Offset (do not select any Months).

Properties

CID

The Class ID for the object

[IgnoreDataMember]
public override ClassID CID { get; }

Property Value

ClassID

Remarks

Obsolete. Use ClassID instead.

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

public DateCriterion DateCriterion { get; set; }

Property Value

DateCriterion

DayMask

A bitmask indicating which days are selected for this rule.

public int DayMask { get; set; }

Property Value

int

Remarks

The DayMask allows you to get or set the day selection, without selecting individual days using GetDay(int) and SetDay(int, bool). The DayMask is a bit mask, with bits 1-31 representing days 1-31.

For example, to select days 1 and 3 you would set bits 1 (=0x2 or binary 10) and 2 (=0x4 or binary 100), so the DayMask would be set to 6 (binary 110).

To select all days, set the DayMask to AllDays.

See Also

Enabled

Determines whether this rule is enabled or disabled (ignored).

public bool Enabled { get; set; }

Property Value

bool

IsDependent

[IgnoreDataMember]
public override bool IsDependent { get; }

Property Value

bool

MonthMask

A bitmask indicating which months are selected for this rule.

public int MonthMask { get; set; }

Property Value

int

Remarks

The MonthMask allows you to get or set the month selection, without selecting individual months using GetMonth(int) and SetMonth(int, bool). The MonthMask is a bit mask, with bits 1-12 representing months 1-12.

For example, to select February and March you would set bits 2 (0x4 or binary 100) and 3 (0x8 or binary 1000), so the MonthMask would be set to 0xC (binary 1100).

To select all months, set the MonthMask to AllMonths.

See Also

Name

An optional descriptive name for the day specification, used in the user interface.

public string Name { get; set; }

Property Value

string

Occurrence

Indicates which occurrence (1st, 2d, 3d, etc.) of the selected weekday(s) to trigger on.

public OccurrenceType Occurrence { get; set; }

Property Value

OccurrenceType

Remarks

The Occurrence is used only when the SpecificationType is FloatingOffset. See the DaySpecification for a discussion of these values.

OccurrenceBase

public DaySpecification OccurrenceBase { get; set; }

Property Value

DaySpecification

Offset

Gets or sets the number of days by which the target date is offset from the date specified by the rule.

public int Offset { get; set; }

Property Value

int

Remarks

If the SpecificationType is FloatingOffset, EndOfMonthOffset, or EasterOffset, the Offset specifies the offset from the calculated date.

For example, if the SpecificationType is EasterOffset, the calculated date will be Easter. To trigger on Easter, set the Offset to 0. To trigger on Good Friday (2 days before Easter), set the Offset to -2. To trigger on the Monday after Easter, set the Offset to 1.

Recurrence

The frequency at which this item recurs.

public int Recurrence { get; set; }

Property Value

int

Remarks

Valid only when SpecificationType is DaySpecificationType.SpecifiedWeekdays. The trigger fires every Recurrence weeks as measured from the date specified by the RecurrenceRelativeTo value.

RecurrenceRelativeTo

public RecurrenceStart RecurrenceRelativeTo { get; set; }

Property Value

RecurrenceStart

RelativityType

Options that affect calculations when SpecificationType is DaySpecificationType.FloatingOffset

public RelativityType RelativityType { get; set; }

Property Value

RelativityType

SpecificationType

public DaySpecificationType SpecificationType { get; set; }

Property Value

DaySpecificationType

UserDescription

An optional extended description for the item.

public string UserDescription { get; set; }

Property Value

string

WeekdayMask

public int WeekdayMask { get; set; }

Property Value

int

Remarks

The WeekdayMask allows you to get or set the weekday selection, without selecting individual days using GetWeekday(Weekday) and SetWeekday(Weekday, bool). The WeekdayMask is a bit mask, with bits 1-7 representing days 1-7 (Sunday is day 1; Saturday is day 7).

For example, to select Saturday and Sunday you would set bits 1 (=0x2 or binary 10) and 7 (=0x40 or binary 1000000), so the WeekdayMask would be set to 0x42 (binary 1000010). To select all days of the week, set the WeekdayMask to AllDaysOfWeek.

See Also

Year

The year to which this item applies.

public int Year { get; set; }

Property Value

int

Remarks

Set to 0 for all years.

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.

GetDay(int)

public bool GetDay(int DayNumber)

Parameters

NameTypeDescription
DayNumber int

Returns

bool

GetMonth(int)

public bool GetMonth(int monthNumber)

Parameters

NameTypeDescription
monthNumber int

Returns

bool

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.

See Also

GetWeekday(Weekday)

public bool GetWeekday(Weekday WeekdayNumber)

Parameters

NameTypeDescription
WeekdayNumber Weekday

Returns

bool

GetWeekday(int)

public bool GetWeekday(int WeekdayNumber)

Parameters

NameTypeDescription
WeekdayNumber int

Returns

bool

SetDay(int, bool)

public void SetDay(int DayNumber, bool selected)

Parameters

NameTypeDescription
DayNumber int
selected bool

SetMonth(int, bool)

public void SetMonth(int monthNumber, bool selected)

Parameters

NameTypeDescription
monthNumber int
selected bool

SetWeekday(Weekday, bool)

public void SetWeekday(Weekday WeekdayNumber, bool selected)

Parameters

NameTypeDescription
WeekdayNumber Weekday
selected bool

SetWeekday(int, bool)

public void SetWeekday(int WeekdayNumber, bool selected)

Parameters

NameTypeDescription
WeekdayNumber int
selected bool

WriteToConfigurationReport(IADTObjectConfigurationReportWriter)

public override void WriteToConfigurationReport(IADTObjectConfigurationReportWriter reportBuilder)

Parameters

NameTypeDescription
reportBuilder IADTObjectConfigurationReportWriter

Inherited Members