Detailed description of php scheduled execution task settings. This article describes how to set php scheduled execution tasks. it is very simple and can be used as a reference for other users. Today, a buddy asked me how to set a scheduled php execution task.
This article mainly introduces how to set php scheduled task execution, which is very simple. For more information, see.
Today, a buddy asked me this question. The problem is that he has an iis server that regularly runs a php script for scanning, below 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.
The code is as follows:
D:
Cd php
Php.exe D:/wwwroot/dingshi. php // path of the script file that is periodically executed
We can test dingshi. php.
The code is as follows:
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!
The above is the setting of php scheduled task execution, which is very simple and can be expanded freely. I hope everyone will like it.
This article describes how to set the php scheduled task execution method. it is very simple and can be used as a reference for other users. Today, a buddy asked me this...