Lithium Posted May 7, 2009 Posted May 7, 2009 As of this, and as MySQL 6 is on the way to be available (stable), and also a few users are already using MySQL 5.1, here it goes a simple replacement example for the 5 minute cron... This is based on the Lite version cron file though with a few tweaks it should suit ANY other version. Let's update users energy You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Now let's fix energy if it goes above 100% You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Now will update You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Now let's fix will if it goes above 100% You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Now brave update You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Now let's fix brave if it goes above 100% You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Now health update You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Now let's fix health if it goes above 100% You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Now that all events were created, let's enable them... You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. And off you go. A few considerations... As you might have noticed, starting day is past, doing this, after enabling the event_scheduler, will allow you to see changes in a matter of minutes/seconds. Also, the "FIX" events are set to 1 second after the main event trigger, this is just the best choice to fix if values go over 100%. And remember this only works if you have MySQL 5.1 and above, less than that it will simply be useless. Performance on this? Well... see for yourself ;) One last word... these events are ready to be dumped in any MySQL tool (phpmyadmin, toad, etc) Quote
RedQueen Posted November 25, 2009 Posted November 25, 2009 ok being a noobie i am at a lost as what i do with this i would like to try it as right now my crons are not working so i am tryin to find away to get as much as i can done with out crons also been using the mccodes update work around but if my power goes out or my pc shuts down then that is stopped so not a very good way to have the site run as i have to be on 24/7 everyday all day works liek a charm though:) Quote
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.