How to share linux scheduled tasks to run php files_PHP tutorial

WBOY
Release: 2016-07-20 11:14:38
Original
822 people have browsed it

Script to create scheduled tasks:

dos2unix /path/to/<span filename.php 
crontab </span>-<span e 
</span><span 10</span> <span 6</span> * * * /path/to/filename.php
Copy after login
# chomod +x /path/to/filename.php
Copy after login

<span #</span><span !/usr/bin/php -q </span>
<?<span php
</span><span //</span><span 写入文件到日志log中</span>
<span file_put_contents</span>('/path/to/log', <span date</span>('Y-m-d H:i:s')."\n",<span FILE_APPEND); 
</span><span //</span><span by www.jbxue.com</span>
?>
Copy after login

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/440271.htmlTechArticleScript to create scheduled tasks: dos2unix /path/to/ - * * * /path/to/filename.php # chomod +x /path/to/filename.php ? ('/path/to/log', ('Y-m-d H:i:s')."n", ?...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template