Click or drag to resize

Schedule Class

Represents a schedule defined using UNIX crontab syntax.
Inheritance Hierarchy
SystemObject
  GSF.SchedulingSchedule

Namespace: GSF.Scheduling
Assembly: GSF.Core (in GSF.Core.dll) Version: 2.4.205-beta+5ef4169f3b1079d8b163dd363614f656bd140924
Syntax
public class Schedule
View Source

The Schedule type exposes the following members.

Constructors
 NameDescription
Public methodSchedule Initializes a new instance of the Schedule class.
Public methodSchedule(String) Initializes a new instance of the Schedule class.
Public methodSchedule(String, String) Initializes a new instance of the Schedule class.
Public methodSchedule(String, String, String) Initializes a new instance of the Schedule class.
Public methodSchedule(String, String, String, Boolean) Initializes a new instance of the Schedule class.
Top
Properties
 NameDescription
Public propertyDayPart Gets the SchedulePart of the Schedule that represents day of month DateTimePart.
Public propertyDaysOfWeekPart Gets the SchedulePart of the Schedule that represents day of week DateTimePart.
Public propertyDescription Gets or sets a description of the Schedule.
Public propertyHourPart Gets the SchedulePart of the Schedule that represents hour DateTimePart.
Public propertyLastDueAt Gets the DateTime when the Schedule was last due.
Public propertyMinutePart Gets the SchedulePart of the Schedule that represents minute DateTimePart.
Public propertyMonthPart Gets the SchedulePart of the Schedule that represents month DateTimePart.
Public propertyName Gets or sets the name of the Schedule.
Public propertyRule Gets or sets the rule of the Schedule defined in UNIX crontab syntax.
Public propertyStatus Gets the current status of the Schedule.
Public propertyUseLocalTime Gets or sets a flag that determines whether the scheduler uses local time or UTC time for scheduling.
Top
Methods
 NameDescription
Public methodEquals Determines whether the specified Schedule is equal to the current Schedule.
(Overrides ObjectEquals(Object))
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
Public methodGetHashCode Gets a hash code for the Schedule.
(Overrides ObjectGetHashCode)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodIsDue Checks whether the Schedule is due at the present system time.
Protected methodMemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Public methodNextTimeDue Determines the nearest timestamp past the given timestamp that matches the schedule.
Public methodPreviousTimeDue Determines the nearest timestamp older than the given timestamp that matches the schedule.
Public methodToString Gets the string representation of Schedule.
(Overrides ObjectToString)
Top
Extension Methods
 NameDescription
Public Extension MethodGetEnumValueOrDefault Gets the enumeration constant for value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions)
Public Extension MethodGetEnumValueOrDefaultT Gets the enumeration constant for this value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions)
Top
Remarks

Operators:

There are several ways of specifying multiple date/time values in a field:

  • The comma (',') operator specifies a list of values, for example: "1,3,4,7,8"
  • The dash ('-') operator specifies a range of values, for example: "1-6", which is equivalent to "1,2,3,4,5,6"
  • The asterisk ('*') operator specifies all possible values for a field. For example, an asterisk in the hour time field would be equivalent to 'every hour' (subject to matching other specified fields).
  • The slash ('/') operator (called "step"), which can be used to skip a given number of values. For example, "*/3" in the hour time field is equivalent to "0,3,6,9,12,15,18,21". So "*" specifies 'every hour' but the "*/3" means only those hours divisible by 3.

Fields:

C#
+---------------- minute (0 - 59)
|  +------------- hour (0 - 23)
|  |  +---------- day of month (1 - 31)
|  |  |  +------- month (1 - 12)
|  |  |  |  +---- day of week (0 - 7) (Sunday=0 or 7)
|  |  |  |  |
*  *  *  *  *

Each of the patterns from the first five fields may be either * (an asterisk), which matches all legal values, or a list of elements separated by commas.

See http://en.wikipedia.org/wiki/Cron for more information.

See Also