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 the year, repeated on a particular date every year, and repeated at a particular time of the day.
Please how do i go about building the database tables for this problem?
Edit #1
Basically, i'm writing an application that allows users to schedule pre-configured greetings to be sent at various pre-configured times. I know i need a table that stores information about a schedule (ex. Christmas, Marketing One, ... | and when the schedule should run). Then another table to record what schedule has ran, what greeting it sent, to who, and what email; basically a transactions table.
My problem is designing the Schedule table because, i want to allow users run the schedule at a specific date, on a particular day of the week (recurring), on a particular day of every month, on a particular time everyday, and on a particular day/month (ex. 25/12) every year.
How can i create a set of tables for schedule that will take care of these inputs in flexible way?
The TASK table contains the tasks that have been scheduled, but not yet purged. The primary key for this table is the TASKID which equates to the getTaskID() method on the com.
The Scheduler enables database administrators and application developers to control when and where various tasks take place in the database environment. These tasks can be time consuming and complicated, so using the Scheduler can help you to improve the management and planning of these tasks.
Within a database, related data are grouped into tables, each of which consists of rows (also called tuples) and columns, like a spreadsheet. To convert your lists of data into tables, start by creating a table for each type of entity, such as products, sales, customers, and orders.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With