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
Php Scheduling
Moderator: General Moderators
- AbraCadaver
- DevNet Master
- Posts: 2572
- Joined: Mon Feb 24, 2003 10:12 am
- Location: The Republic of Texas
- Contact:
Re: Php Scheduling
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.
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.
Re: Php Scheduling
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.
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
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
Hello
thanks for the replies. My problem is fixed with the help of windows scheduler
thanks for the replies. My problem is fixed with the help of windows scheduler