I have an existing data structure I’m forced to work with whereby scheduled events are saved by day of week and hour.
I’m using SQL Server 2008 and an ASP.NET console application (temporarily) to trigger.
Trigger times are stored as boolean values in the database.
Example:
SendMonday bit Unchecked
SendTuesday bit Unchecked
SendWednesday bit Unchecked
...
=====================================
Send0000 bit Unchecked
Send0100 bit Unchecked
Send0200 bit Unchecked
Send0300 bit Unchecked
...
What would be the best approach from both a theoretical and programming perspective in order to trigger the event at the specific time?
My approach involved storing a ‘LastProcessed’ date in the database and doing a lot of manual work but wondered if there was a better approach.
I would use the SQL Server Agent to run a scheduled task on an hourly basis to check for events that need to be invoked.