Why can't I execute php scripts on a regular basis ???? I checked a lot of posts on the Internet and tried various methods... Help! Execute the test. php file once every minute and set the executable permissions. Then edit the cronb file as follows: * 1 ***** rootusrlocalphp5binphpusrlocalapachehtdocstest. php. why am I still executing the php script in test. ph ????
I checked a lot of posts on the Internet and tried various methods... Help!
Execute the test. php file once every minute and set the executable permissions.
Then edit the cronb file as follows:
*/1 ***** root/usr/local/php5/bin/php/usr/local/apache/htdocs/test. php
I added this sentence at the beginning of the test. php file:
#! /Usr/local/php5/bin/php-q
Er, I have no idea whether/usr/local/php5/bin/PHP is correct when I add the php interpreter path on the Internet? It is generally used #! /Usr/bin/php...
Where is the problem? I don't know how to change it.
------ Solution --------------------
Instead of modifying the crontab file, use the following method:
Crontab-e press enter
Enter */1 *****/usr/local/php5/bin/php/usr/local/apache/htdocs/test. php
Save and exit
If your php file is correct, you should be able
For security reasons, it is best to check the php error_log and use the mail command to view the execution status of the scheduled task.