Database table design for scheduling tasks

后端 未结 5 1326
悲哀的现实
悲哀的现实 2020-12-08 05:09

I want to be able to create schedules that can be executed based on a fixed date, repeated daily, repeated on a particular day of the week, repeated on a particular month of

5条回答
  •  无人及你
    2020-12-08 06:05

    This is the table structure i came up with;

    Schedule
     - ScheduleName
     - ScheduleTypeId (Daily, Weekly, Monthly, Yearly, Specific)
     - StartDate
     - IntervalInDays
     - Frequency
     - FrequencyCounter
    
    ScheduleDaily
     - ScheduleDailyId 
     - ScheduleId
     - TimeOfDay
     - StartDate
     - EndDate
    
    ScheduleMonthly
     - ScheduleMonthlyId
     - ScheduleId
     - DayOfMonth
     - StartDate
     - EndDate
    
    ScheduleSpecific
     - ScheduleSpecificId
     - ScheduleId
     - SpecificDate
     - StartDate
    
    ...
    
    ScheduleJob
     - ScheduleJobId
     - ScheduleId
     - ScheduleTypeId
     - RunDate
     - ScheduleStatusId
    

提交回复
热议问题