Home > Article > Backend Development > Detailed explanation of php scheduled execution task settings, detailed explanation of php tasks_PHP tutorial
A buddy asked me this question today. The problem is that he has an IIS server and needs to execute a scanning php script regularly. How to do this? It is executed once every hour. Here are the settings for Windows
1) Double-click Task Scheduler in the Control Panel to open the Windows Task Scheduler window.
2) Double-click to add a task to open the task planning wizard. Click Next.
3) Click to browse and select the program you want to run
4) Enter the plan name and select Daily
5) Set the starting time, select each day, and the starting date. Next step.
6) Enter the password, which is the password of the user name of the system (use default). Next step
7) Choose to open the advanced properties of this task when you click Finish.
8) In the advanced properties window, select the Schedule tab and select Advanced
9) In the advanced planning options, check the recurring task and set the duration to 24 hours.
10) It can be updated once an hour and work 24 hours a day.
Then we continue to solve how to support the scheduled execution of scripts, so we need to write a script, such as test.bat
I installed php to the D drive, using php-cgi.exe
We can test dingshi.php
Let’s double-click test.bat, and then check whether a.php has written test. The program our scheduled task runs is test.bat, so it will be executed automatically!
The above is the setting method for php scheduled execution tasks. It is very simple. Friends can expand it freely. I hope you will like it