I have a basic asp.net core web app connected to a database for an "dynamic employee schedule". The main page displays who is available next, who is already scheduled or if they are off work. Each database record has a "Status" field containing values such as, "Off Shift", "Scheduled", or "Available"
I want to update this field automatically based on other static records such as Shift Start/End Time, Booked Schedule, etc.
Is it better to write the logic code into the View Controller for checking and setting the status every time the page is loaded, or create a SQL Agent scheduled job to update the database every 15 or 30 minutes? Or other better way that I am unaware of?
Thanks!