There is an email script in the project that needs to go to the database every two minutes to read the unsent messages and send them out. I have no problem running in the browser. But because it needs to run all the time, you want to use Windows's scheduled tasks to do it regularly.
The bat file is written like this:
D:\wamp\bin\php\php5.4.3\php.exe-q D:\wamp\www\cron\mailqueue-2min.php
But the execution of the words always fails to send.
Ask me what the problem is. What is the difference between Php.exe execution and browser operation?
Reply to discussion (solution)
The parameters should use-F.
D:\wamp\www\cron\mailqueue-2min.php inside if there is reqiure or include, please use absolute address, this is the problem!
D:\wamp\bin\php\php5.4.3\php.exe D:\wamp\www\cron\mailqueue-2min.php
Remove the middle-Q to see
Problem solved the problem is not the parameter is the configuration file problem I use the WAMP environment has two INI files two files inside the configuration have to change