PHP scheduled execution of task settings detailed
One of my buddies asked me this question today, the problem is that he has an IIS server, to schedule a scan of the PHP script, this How to do, every hour, the following is the Windows settings
1) In Control Panel, double-click Task Scheduler to open the Windows Task Scheduler window.
2) Double-click Add Task to open the Task Scheduler Wizard. Click Next.
3) Click Browse, select the program to run
4) Enter the plan name and select Daily
5) Set start time, select Daily, start date. Next.
6) Enter the password, which is the password for the system's user name (by default). Next
7) Select the advanced properties for this task to open when you click Finish.
8) In the Advanced Properties window, select the Schedule tab, select Advanced
9) In the Advanced Plan option, tick the repeat task duration: set to 24 hours.
10) can be updated hourly, 24 hours a day to work.
Then we continue to work out how to support the timing of the script execution, so we have to write a script, such as Test.bat
My PHP is installed on the D drive, using Php-cgi.exe
D:CD phpphp.exe d:/wwwroot/dingshi.php //The path of the script file executed at timed time
We can test the dingshi.php.
File_put_contents ("a.php", "Test");
We double-click on the Test.bat, and then see if a.php is written to test, our scheduled task runs the program is Test.bat this will be automatically executed!
The above is the PHP scheduled to perform the task of the Setup method, very simple, the small partners free expansion can be, I hope you can like