I have a flash application. I’m trying to send users text messages via php after they did certain things on the flash.
For example,
- Text user 1 hour after they did
thing#1. - Text user 10 minutes after they did
thing#2. - Text user 1 day after they did
thing#3.
….
I’m thinking of setting up a table for the list of things that will trigger the text. Then have a cron job set up to check the timestamps of each user finishing those things.
Is there a better way out there for doing this?
That sounds like the approach I would take. Whenever you have an action that takes place at a different time than the web request, you need to “queue” that action up to be completed later. Then you need a script that runs (however often you want) that checks the queue (i.e. DB table) and processes the items in the queue.
You’re on the right track.