Right now, events go off sale at a fixed time before the event (defined in settings), or when they sell out or inventory is reduced below the sales margin.
The actual event sale expiration event actually happens when the add to cart form is executed, however, which means that in some cases there can be a significant delay between when an event goes off sale and when the off-sale notifications & ticket list is sent to the box office.
A relatively simple solution is to add a one-off cron for the event that will trigger the expiration event. It's still triggered based on visits, but no longer requires a visit to the sales page; and sites that need greater predictability can use real cron.
Question is when to create the cron job. Could create it at event creation, but then need to support removing and updating it if the event is changed. I could also create it on the fly during a load in advance of the event expiration, e.g. 24 hours before. At that point, event changes are unlikely, and it also means fewer cron events in the scheduler.
Right now, events go off sale at a fixed time before the event (defined in settings), or when they sell out or inventory is reduced below the sales margin.
The actual event sale expiration event actually happens when the add to cart form is executed, however, which means that in some cases there can be a significant delay between when an event goes off sale and when the off-sale notifications & ticket list is sent to the box office.
A relatively simple solution is to add a one-off cron for the event that will trigger the expiration event. It's still triggered based on visits, but no longer requires a visit to the sales page; and sites that need greater predictability can use real cron.
Question is when to create the cron job. Could create it at event creation, but then need to support removing and updating it if the event is changed. I could also create it on the fly during a load in advance of the event expiration, e.g. 24 hours before. At that point, event changes are unlikely, and it also means fewer cron events in the scheduler.