swa66 - 11:37 pm on Dec 7, 2012 (gmt 0)
The concept of a state diagram in the manner I was referencing:
have a number of well defined states (e.g. free, booked but unpaid, paid, abandoned booking, ...)
And a number of well defined ways to transit from one to the other, that have a trigger to cause it.
The trigger can easily be a timeout (e.g. if it's not paid within 2 hours we release the hold on a room.)
all you do is run a query every once in a while (e.g. every 5 minutes to seek those that are too long in a state with a timeout and change their state. Doing this can be done in either a script from a cron job, or either in an include you run off of your site that checks to see when the last time the "maintenance" was, and quickly do it before proceeding.