Php scheduled task execution today, a buddy asked me this question. The problem is that he has an iis server and needs to regularly execute a scanned php script. how can this problem be solved, run the command once every hour. The following are windows settings.
1) double-click the task scheduler in the control panel to open the Windows Task Scheduler window.
2) double-click add task to open the Task Scheduler wizard. Click next.
3) Click browse and select the program to run
4) enter a scheduler name and select Daily
5) set the start time, day, and start date. Next step.
6) enter the password, which is the user name (by default) of the system. Next Step
7) click finish to open the advanced properties of the task.
8) in the advanced properties window, select the schedule tab and advanced
9) in the advanced plan option, select "repeat task". Duration: Set to 24 hours.
10) it can be updated every hour, working 24 hours a day.
Then we will continue to solve how to support the regular execution of scripts, so we will wait for a script to be written, such as test. bat.
I used php-cgi.exe to install PHP on the D drive.
D: cd phpphp.exe D:/wwwroot/dingshi. php // path of the script file that is periodically executed
We can test dingshi. php.
File_put_contents ("a. php", "test ");
Double-click test. bat and check whether a. php has written test. the program running in our scheduled task is test. bat, which will be automatically executed!