Why don't I execute php scripts on a regular basis?

Source: Internet
Author: User
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 *** root/usr/local/php5/bin/php/usr/local/apache/htdoc. Why does my regular php script execution fail? what about execution ????
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.