Page 1 of 1

Php Scheduling

Posted: Wed Aug 24, 2011 5:30 am
by kosaks
Hello to everyone

Does anyone knows how to schedule php script? I have a script that saves the scheduled task on MYSQL database. What i want is that when the scheduled task reach its due date, the php script will initiate automatically without any user interaction.

I've tried using Windows Scheduler but it will not solve my problem because windows scheduler only runs when it reaches its scheduled time. Only then the script will initiate.

Please help me guys. I will really appreciate all the help i cant get.

thanks in advance

Re: Php Scheduling

Posted: Wed Aug 24, 2011 10:27 am
by AbraCadaver
You have a date and a script name (let's call it script.php) in MySQL. Write another script (let's call it check_date.php) that queries the database for the current date and executes the associated script (script.php). Now set up a scheduled task that runs check_date.php every day at midnight. You could also set this up to run every five minutes if you want.

Re: Php Scheduling

Posted: Wed Aug 24, 2011 12:50 pm
by kosaks
Hello sir

thanks for the reply. i was hoping if i can call the php script everytime the schedule will reach it's due date. anyways your reply was also helpful.

thank you so much.

Re: Php Scheduling

Posted: Wed Aug 24, 2011 4:07 pm
by Doug G
You may be able to fire off the php script from a mysql function or procedure called by the existing mysql procedures. Just a guess.

Re: Php Scheduling

Posted: Tue Aug 30, 2011 7:19 am
by kosaks
Hello

thanks for the replies. My problem is fixed with the help of windows scheduler