In linux, the PHP file is automatically executed. I now have a php file (retrieve the address information in the record from the database, use google to find the longitude and latitude, and then update the database). This file has the database connection method, there are database update functions. Due to the limit on the number of google queries, the PHP file needs to be executed every 6 minutes. Automatically execute php files in linux
I now have a php file (retrieve the address information in the record from the database, and then use google to find the longitude and latitude, and then update the database). This file includes the method for connecting to the database and updating database functions.
Due to the limit on the number of google queries, the PHP file needs to be executed every 6 minutes.
It is equivalent to entering the php address in the browser url address bar and refreshing it every 6 minutes. However, the browser method is very difficult and requires constant watching.
Now you need to write a script to automatically execute the file.
------ Solution --------------------
Use the crontab command
------ Solution --------------------
Discussion
This operation is only executed at startup.
What about scheduled execution?
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