Post Date Usability and Architecture

56 Views Asked by At

I have an application that deals with events. After an event has occurred, I need to email my users and ask them about the event, and allow to upload photos, etc.

My question is Whats the best way for my system to automatically detect that its "post event" time other than running some unix cronjob?

I use MySQL - is there some trigger that I can set, either in PHP or MySQL?

How do sites usually do this?

Thanks, Alex

2

There are 2 best solutions below

0
On BEST ANSWER

A php script on a cronjob/scheduled task is the easiest, simplest way to do so.

I suppose you could make the check a part of the scripting for the site or something that checks when any user accesses the site. You'd want to store the last time it checked and check for events that occurred between then and now and email for them, and also check the last time it checked to determine if it should look again, so you don't have it running every time a user accesses the page.

0
On

Yes, it is the event scheduler built-in mysql, but I have no idea how this can help you, since it will be very tricky to send emails from it.