Scheduled tasks in Windows Execute PHP file method
Scheduled Tasks, Windows
Using our windows planning tasks to implement the timing of PHP file method, there is a need to learn friends can refer to.
Method one, executing in cmd
How is it easy to execute PHP commands in Windows like PHP under the liunx command (execute PHP files under Dos)?
The solution is fairly straightforward, as long as the PHP project belongs to the directory such as: My project file: d:\web\www\, so I just jump path added to the system variable inside the OK, in order to facilitate the paste here: D:\web\www\;D: \web\mysql\bin\;D: \web\php\;
Right-click My Computer-"properties-" advanced-"environment variable re-system variables-" edit path,
Add the php.ini file path, reboot the server, and turn off cmd.
To start executing PHP files:
Has the effect of ha .... With
If you want to be in any directory can be executed in cmd MySQL, the mysql\bin\ directory test to the PATH environment, restart MySQL, shut down CMD can
Method two, build a. bat file and copy the following code to the
D:\web\php\php.exe "D:\web\www\XXXX\trunk\src\crontab\userlist.php" into the Test.bat file,
Then in the computer's "Control Panel-" task plan-"Add a task plan"