SCHEDULE

Stores schedule information

Primary Key

Primary Key Field Type
ID uniqueidentifier

Fields

Field Field Type Null Notes Description
ENABLED bit Default = 1 Whether or not the schedule is enabled.
TYPECODE tinyint Default = 1 Indicates the type of schedule.
TYPE nvarchar(16) (Computed) yes CASE [TYPECODE] WHEN 1 THEN N'Once' WHEN 4 THEN N'Daily' WHEN 8 THEN N'Weekly' WHEN 16 THEN N'Monthly' WHEN 32 THEN N'MonthlyRelative' WHEN 64 THEN N'Annually' WHEN 128 THEN N'AnnuallyRelative' END Provides a translation for the 'TYPECODE' field.
FREQUENCY tinyint Default = 0 Used for recurring schedules to define how frequently they occur.
SUBDAYFREQUENCYTYPECODE tinyint Default = 0 Used for schedules that will occur regularly throughout a day to specify the recurrence frequency.
SUBDAYFREQUENCYTYPE nvarchar(8) (Computed) yes CASE [SUBDAYFREQUENCYTYPECODE] WHEN 0 THEN N'None' WHEN 2 THEN N'Secondly' WHEN 4 THEN N'Minutely' WHEN 8 THEN N'Hourly' END Provides a translation for the 'SUBDAYFREQUENCYTYPECODE' field.
TIME time yes Used for schedules that will occur at most once in a day.
SUBDAYFREQUENCY tinyint Default = 0 Used for recurring schedules that occur regularly throughout the day.
SUBDAYSTARTINGTIME time yes Used for schedules that will occur regularly throughout a day to the time range during which recurrence should happen.
SUBDAYENDINGTIME time yes Used for schedules that will occur regularly throughout a day to the time range during which recurrence should happen.
DAYSOFWEEK tinyint Default = 0 Used by weekly schedules to specify the days for which the schedule will occur. Bitwise selection of weekday, Sun=0b1, Sat=0b1000000.
DAYOFMONTH tinyint Default = 0 Specified the day of the month to occur. This is used by monthly schedules and annual schedules that occur on a specific date.
WEEKCODE tinyint Default = 0 Used by monthly relative and annually relative schedules to specify which week for the occurrence.
WEEK nvarchar(6) (Computed) yes CASE [WEEKCODE] WHEN 0 THEN N'None' WHEN 1 THEN N'First' WHEN 2 THEN N'Second' WHEN 3 THEN N'Third' WHEN 4 THEN N'Fourth' WHEN 5 THEN N'Last' END Provides a translation for the 'WEEKCODE' field.
DAYOFWEEKCODE tinyint Default = 0 Used by monthly relative and annually relative schedules to specify the day of the week for the occurrence.
DAYOFWEEK nvarchar(11) (Computed) yes CASE [DAYOFWEEKCODE] WHEN 0 THEN N'None' WHEN 1 THEN N'Sunday' WHEN 2 THEN N'Monday' WHEN 3 THEN N'Tuesday' WHEN 4 THEN N'Wednesday' WHEN 5 THEN N'Thursday' WHEN 6 THEN N'Friday' WHEN 7 THEN N'Saturday' WHEN 8 THEN N'Day' WHEN 9 THEN N'Weekday' WHEN 10 THEN N'Weekend day' END Provides a translation for the 'DAYOFWEEKCODE' field.
MONTHCODE tinyint Default = 0 Used by annual and annually relative and schedules to specify the month of the occurrence.
MONTH nvarchar(9) (Computed) yes CASE [MONTHCODE] WHEN 0 THEN N'None' WHEN 1 THEN N'January' WHEN 2 THEN N'February' WHEN 3 THEN N'March' WHEN 4 THEN N'April' WHEN 5 THEN N'May' WHEN 6 THEN N'June' WHEN 7 THEN N'July' WHEN 8 THEN N'August' WHEN 9 THEN N'September' WHEN 10 THEN N'October' WHEN 11 THEN N'November' WHEN 12 THEN N'December' END Provides a translation for the 'MONTHCODE' field.
STARTDATE date Used for recurring schedules to specify when the schedule will become active.
ENDDATE date yes Used for recurring schedules to specify when the schedule will become inactive.
LASTRUNTIME datetime yes

Indexes

Index Name Fields Unique Primary Clustered
IX_SCHEDULE_ENABLED_ENDDATE_STARTDATE ENABLED, ENDDATE, STARTDATE
PK_SCHEDULE ID yes yes

Referenced by

Referenced by Field
BUSINESSPROCESSSCHEDULE SCHEDULEID