Class DateCriterion
- Namespace
- ArcanaDevelopment.adTempus.Client
- Assembly
- ArcanaDevelopment.adTempus.Client.dll
Specifies rules for the dates on which a job will trigger
[ComVisible(true)]
[Guid("78d78c49-f4a0-4f8b-89b1-2941a24aa151")]
public sealed class DateCriterion : ADTObject
- Inheritance
-
objectDateCriterion
Remarks
To execute the job at a fixed interval (every x days) set CriterionType to Interval and set the Interval to the number of days to repeat after.
To execute the job on specific days (using a list of dates or rules to calculate the dates) set CriterionType to SpecifiedDays and add rules to the Days collection.
Properties
ClassID
The Class ID for the object
[IgnoreDataMember]
public override ClassID ClassID { get; }
Property Value
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
Indicates the type of criterion
public DateCriterionType CriterionType { get; set; }
Property Value
Remarks
For Interval, set the Interval to the interval in days at which the criterion should repeat.
For SpecifiedDays, add rules to the Days collection to define the days when the criterion applies
Days
Rules defining the days the criterion applies to when CriterionType is SpecifiedDays
public DaySpecificationCollection Days { get; }
Property Value
EndDate
The latest date (inclusive) that this criterion applies
[ComVisible(false)]
public DateTime? EndDate { get; set; }
Property Value
- DateTime?
Remarks
This value should be specified in the time zone of the adTempus server. The time portion of the value is ignored
Interval
The interval (in days) at which the criterion repeats when CriterionType is Interval
public int Interval { get; set; }
Property Value
- int
Remarks
Set to 1 to repeat every day, 2 to repeat every second day, etc.
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 this criterion belongs to, if applicable
public Schedule Schedule { get; }
Property Value
SharedSchedule
The SharedSchedule this criterion belongs to, if any.
public SharedSchedule SharedSchedule { get; }
Property Value
StartDate
The earliest date (inclusive) that this criterion applies
[ComVisible(false)]
public DateTime? StartDate { get; set; }
Property Value
- DateTime?
Remarks
This value should be specified in the time zone of the adTempus server. The time portion of the value is ignored
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.
GetMatchingDates(DateTime, DateTime)
Gets a list of dates in the specified range that match the rules of this criterion.
public ReadOnlyCollection<ScheduleMatchDate> GetMatchingDates(DateTime startDate, DateTime endDate)
Parameters
| Name | Type | Description |
|---|---|---|
startDate |
DateTime | The starting date (inclusive) of the range to check. Specify in the time zone of the adTempus server. |
endDate |
DateTime | The ending date (inclusive) of the range to check. Specify in the time zone of the adTempus server. |
Returns
- ReadOnlyCollection<ScheduleMatchDate>
A collection of all dates within the specified range that match the rules defined by this criterion
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
| Name | Type | Description |
|---|---|---|
reportBuilder |
IADTObjectConfigurationReportWriter | The report builder to write the object to. |
Inherited Members
- ADTObject.LastModified
- ADTObject.CreationTimestamp
- ADTObject.FromController
- ADTObject.CustomProperties
- ADTObject.Description
- ADTObject.DescriptionTextType
- ADTObject.OID
- ADTObject.BindingDescription
- ADTObject.ToString()
- ADTObject.ParentObject
- ADTObject.CanPerform(SecurityPermission)
- ADTObject.Duplicate()
- ADTObject.DataContext
- ADTObject.AccessMask
- ADTObject.Validate(MessageCollection)
- ADTObject.SupportedSecurityActions
- ADTObject.SupportedSecurityInheritanceOptions
- ADTObject.GetTopLevelOwner()
- ADTObject.GetConfigurationReport()
- ADTObject.GetConfigurationReport(bool)
- ADTObject.IsReadOnly
- ObjectBase.IsDirty
- ObjectBase.IsNew
- ObjectBase.IsStub
- ObjectBase.ClassName
- ObjectBase.GetDescriptionWithClassName()
- ObjectBase.GetDescription()
- ObjectBase.BeginEdit()
- ObjectBase.BeginEdit(UndoLevelAction)
- ObjectBase.CommitEdit(Guid)
- ObjectBase.CommitEdit()
- ObjectBase.UndoEdit()
- ObjectBase.UndoEdit(Guid)