Author:North SouthFrom:Linuxsir. orgAbstract:In a Linux operating system, scheduled tasks are usually undertaken by cron. Understanding or understanding cron can help us manage servers more conveniently and save more time. This article also provides
The efficiency of the PHP dead loop to handle timed tasks is very low. It is recommended that you use the Linux built-in timer Task crontab command to invoke the PHP script to implement. This article is mainly to share with you the PHP combined with
Allow crontab to automatically schedule rows of PHP
To use the crontab auto-dynamic PHP program, you can do this:
Method 11. Add the following in the first line of the PHP program:
#! /Usr/local/PHP/bin/PHP-Q
For example:
Plain textPHP:
#!
Linux wget command example
Wget is a useful GNU command line tool for downloading files from the Internet. The utility can use common protocols (such as HTTP, HTTPS, and FTP) to download files from the server. It runs in the background
The efficiency of the PHP dead loop to handle timed tasks is very low. (Many users rated)It is recommended that you use the Linux built-in timer Task crontab command to invoke the PHP script to implement.Two ways to schedule PHP tasks:1, the Web way
In Linux, the FTP site synchronizes a sentence script and the application wget-Linux Enterprise Application-Linux server application information. The following is a detailed description. It is very simple, as follows:
Wget-B-m-nH ftp: // user:
We install Linux systems first, such as centos7.1, there is no wget download tool. wget This command cannot be used.We useyum-y Install wgetYum Install Perlwill appear:[email protected] ~]# Yum-y install wgetloaded plugins:fastestmirrorrepodata
Input commandOpen a file, the default editor is VI.Input vi Editor, input i for INSERT, input w save, Q exit, Force. wq! force save and exit.* * * * * */usr/bin/wget-q-o temp.txt http://www.baidu.com* * * * * sleep 10; /usr/bin/wget-q-o temp.txt
How to use a scheduled task in combination of wget and crontab ......
After even tests and practices, this is definitely a good article! Believe me ...... Author: PHPMA Lujiang Youyu ......
Execute crontab-e to edit the task file and add a line in
Transferred from: 82347473
1. CPU 100%, use top to view CPU
2. Delete the CPU or 100% of the process.
3. It is estimated that the process is hidden.
4. One execution task is added to the scheduled task.
5: Open the connection
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.