I am developing a web application (PHP/MySQL), in which I need to implement timers (record id
expires at expiration_date
), where expiration involves the record's state
being updated and arbitrary code being executed as required.
I basically need a BPMN Timer event.
Options I have considered, none of which I am thrilled with:
- Cronjob calling a function in the application that just queries for and updates expired records.
- At a commonly called point in the code, call this function at a fixed interval.
How is this commonly done in PHP applications?