Automatic Updates. no one has ever done this kind of code.
Source: Internet
Author: User
Tutorial: automatic update. Is there any code like this? What I want to achieve is to automatically update the articles in the article list every 30 minutes (or 1 hour, or 3 hours, that is, the articles in each article list are different. if there are newly added articles in the background, these newly added articles must be at the beginning, next to the batch of articles to be updated, such a cyclical cycle, 1) list read cache files displayed. 2) Tutorial: automatic updates. Is there any code like this?
What I want to achieve is that every 30 minutes (or 1 hour, or 3 hours), the articles in the article list are automatically updated, that is, the articles in each article list are different.
In addition, if there are newly added articles in the background, these newly added articles will inevitably come first, followed by the batch of articles to be updated,
Such cycle
------ Solution --------------------
1) read cached files from the displayed list.
2) update the list of php files, such as a. php.
3) you can choose one of the following update methods.
3.1) the server develops a scheduled task and executes a. php.
3.2) manually triggered. go to the list page to check how long the cached file was last updated. if it exceeds XX hours, execute a. php.
------ Solution --------------------
For linux, use crontab.
------ Solution --------------------
When a request comes in, the system checks whether the last update is more than half an hour long. if the request is exceeded, the system checks whether the last update is more than half an hour long.
------ Solution --------------------
Discussion
Reference:
For linux, use crontab.
.. I just started to chew on LINUX .... The WAMP environment is still used.
------ Solution --------------------
Discussion
I just found a JQUERY scheduled alarm clock. I don't know if it can be used for transformation. I 'd like to try it first.
------ Solution --------------------
To be displayed in a browser, use JS or JQUERY.
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