jdephillipii Posted November 10, 2010 Share Posted November 10, 2010 I am currently working on an application to schedule conferences. I have everything completed to create a conference including start time and duration. The problem I have now though is how do I monitor MySQL for the conferences that are created and perform actions when the duration of the conference is up? I was looking into MySQL events but those seem to be only internal events and are not able to execute anything outside of that. I was thinking about a infinite loop that queries MySQL and sleeps for one second but thought that this might be a lot of load on the server. Any thoughts I really appreciate it. Quote Link to comment https://forums.phpfreaks.com/topic/218290-php-monitor-mysql-and-perform-operations-at-specific-times/ Share on other sites More sharing options...
trq Posted November 10, 2010 Share Posted November 10, 2010 You will need to schedule a job via your servers OS. Cron on Linux or Scheduler on Windows. Quote Link to comment https://forums.phpfreaks.com/topic/218290-php-monitor-mysql-and-perform-operations-at-specific-times/#findComment-1132612 Share on other sites More sharing options...
jdephillipii Posted November 10, 2010 Author Share Posted November 10, 2010 I never even thought of that...geez. Do you think that if I am scheduling a good amount of WGETs to run it would overload the box? Thank You! Quote Link to comment https://forums.phpfreaks.com/topic/218290-php-monitor-mysql-and-perform-operations-at-specific-times/#findComment-1132615 Share on other sites More sharing options...
trq Posted November 10, 2010 Share Posted November 10, 2010 I never even thought of that...geez. Do you think that if I am scheduling a good amount of WGETs to run it would overload the box? Thank You! I don't have enough information to say so, but in general, I wouldn't think so. Quote Link to comment https://forums.phpfreaks.com/topic/218290-php-monitor-mysql-and-perform-operations-at-specific-times/#findComment-1132618 Share on other sites More sharing options...
jdephillipii Posted November 10, 2010 Author Share Posted November 10, 2010 So I guess here is the problem...I am creating this as a Cisco IP Phone Application and it needs to send HTTP request to the phones at the duration end time. If I use cron I would not have something that monitors for new conferences being scheduled...for example what if a user creates a conference that is only 15 minutes long how would I know that it was created and run the commands when the time is up? Quote Link to comment https://forums.phpfreaks.com/topic/218290-php-monitor-mysql-and-perform-operations-at-specific-times/#findComment-1132620 Share on other sites More sharing options...
trq Posted November 10, 2010 Share Posted November 10, 2010 You would need to execute a cron job every minute say, and have it check the database to see what messages are due to be sent. Quote Link to comment https://forums.phpfreaks.com/topic/218290-php-monitor-mysql-and-perform-operations-at-specific-times/#findComment-1132783 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.