I am writing a web application. In its database there is a table that keeps some due dates. Another table has two columns: name and state. I want the state column to be automatically updated when any of those due dates arrives (the updated value is calculated according to some logic in my program).
How can I implement this functionality? Is it common to run another program (independent of my web application) on the server machine to check the database for due dates and update the table or there are other ways?
Although some databases support scheduled tasks, most DBAs use
cronto schedule a task that does the work.I suggest you do the same.
(Thanks to catcall for his comment)