Crontab-Cron executes the php file using the CI framework

Source: Internet
Author: User
A project requires a php file to process data once every minute, and the LNMP can't be used to directly access the database through 127.0.0.1. I have never touched Cron before. I have found several solutions. the simulated client sends a request to the domain path every minute. If you do not use the framework to implement your own projects, you need to have a php file process data once every minute, and you cannot directly access the php file through 127.0.0.1 using LNMP.
I have never touched the Cron online search before. now I plan to find several solutions.

  1. The simulated client sends a request to the domain/path every minute.

  2. You do not use the framework to read, parse, and encapsulate data into the database.

Do you have any good solutions? The framework uses CI

Reply content:

A project requires a php file to process data once every minute, and the LNMP cannot be accessed directly through 127.0.0.1.
I have never touched the Cron online search before. now I plan to find several solutions.

  1. The simulated client sends a request to the domain/path every minute.

  2. You do not use the framework to read, parse, and encapsulate data into the database.

Do you have any good solutions? The framework uses CI

LinuxcrontabAh

# Php file calling method */10 *****/usr/local/webserver/php/bin/php/www/project/test.com/price.php?#shwriting method #/10 ***** sh/www/project/ test.com/price.sh # laravel framework ***/usr/local/php/bin/php/home/project/service.com/artisan schedule: run ## ThinkPHP framework writing method */1 *****/usr/local/webserver/php/bin/php/www/home/project/dc/cli. php CancelOrder/cancel

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.