Hard to put my question into a title. What I am looking for is a way to see which tasks were scheduled to run in the past 15 minutes.
I currently have a table that shows the window that a task should run and how often it should be kicked off within that window. However, I have no experience with this type of query. Hopefully somebody can help out a bit. I should also say that I'd like to do this without creating extra tables
Schedule Table
| taskID | startTime | endTime | everyMinutes |
|________|___________|_________|______________|
| 135467 | 8:00 | 20:00 | 15 |
| 675314 | 7:15 | 13:45 | 30 |
For example, in the above table, if the time was 9:18, the query would return both tasks
| taskID | scheduledTime|
|________|______________|
| 135467 | 9:15 |
| 675314 | 9:15 |
Where as if it was ran at 9:35 the query would only return 1 result
| taskID | scheduledTime|
|________|______________|
| 135467 | 9:30 |