Hi, my site needs to carry out daily checks on user's accounts and then carry out an action depending on the result. It needs to check the following things on a daily basis:
- check if a new member has updated their profile within 7 days (IF $create_timestamp is > than 7 days and $profile_update = no WHERE user = $user, then email the $user)
- check if a member has added their daily post (IF $today_post = no WHERE user = $user, then email the $user)
There are about 5 checks that need to be carried out each day, however, because all of my members are from different timezones, i want to carry out these checks every hour as i only want to query the users who's day has just started (00:01)
Is running a CRON file with these 5 queries (checks) the best way to make these checks or is there a more solid or better way of doing this, thanks in advance...
Set a CRON to run the script every hour and process only those members whose timezone is 00h00
Ha, thanks for your reply, that's what I said I was going to do ;)
Cool, thanks, has anyone else got any input into this... thanks in advance
If your queries are all on a single table, combine them. (SELECT email FROM users WHERE (X AND Y) OR (Z AND R) OR (S AND T)). Use your query to filter the results, rather than PHP, as much as possible.
Ok cool, thanks for your help, much appreciated