AKalair Posted March 6, 2010 Share Posted March 6, 2010 Hi guys, It is possible to trigger an event at a certain time in PHP and MYSQL ? For example I have a database of events and as each one occurs I want it to tweet out a message to Twitter So it is possible to do something like: if (time == timeofevent): Send message Thanks Quote Link to comment Share on other sites More sharing options...
Mchl Posted March 6, 2010 Share Posted March 6, 2010 Google 'cron' Quote Link to comment Share on other sites More sharing options...
AKalair Posted March 9, 2010 Author Share Posted March 9, 2010 Hi, Thanks for the reply Is there no way to do this in the language ? How do things like Google Calander pop up alerts for events ? Thanks Quote Link to comment Share on other sites More sharing options...
trq Posted March 9, 2010 Share Posted March 9, 2010 PHP isn't a service. It only comes to life when a web server gets a request that needs to be parsed by it. Cron is the periodic scheduler used on Linux. Quote Link to comment Share on other sites More sharing options...
Mchl Posted March 9, 2010 Share Posted March 9, 2010 How do things like Google Calander pop up alerts for events ? They run JavaScript script in the browser that periodically polls server for updates. Quote Link to comment Share on other sites More sharing options...
trq Posted March 9, 2010 Share Posted March 9, 2010 How do things like Google Calander pop up alerts for events ? They run JavaScript script in the browser that periodically polls server for updates. I would also assume they run some sort of scheduler every minutes or so and check dates & times and send notifications. Quote Link to comment Share on other sites More sharing options...
Mchl Posted March 10, 2010 Share Posted March 10, 2010 For email notifications for sure. For (in-browser) popups not necessarily. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.