I would like to run PHP in Server like this for example i want to check customers birthdays...
$someones_birthday_today = mysql_query("SELECT * FROM users WHERE birthdate=".date('Y-m-d')." ");
if($someones_birthday_today){
mysql_query("INSERT INTO birthdays (`user_id`, `birthdate`) VALUE ('$user_id', '$birthdate') ");
}
To query Select and Insert does not slow the process. But this is a Http Request From a Mobile App im developing. I dont want to Request everytime the user visit my app log view.
Every minute/day/month, it will check for birthdays today and insert to database this is for notifications. When a user logs in to his profile, php will then query the birthdays table if there are any.
Reasons: So that i want have to query select and insert everytime a users login to his profile. In this way, the page will load faster
Research: I did some research on cron job. It says that it should have an access to shell, in web host. But is there any other way?
Im using Mac Mavericks 10.9 Im using Laravel