lamp定时任务之 crontab01-27

在php项目中,需要很多定时更新或者修改的任务,例如时间状
态;所以需要使用定时任务定时自动更新或执行。
在linux中用命令crontab,在PHP项目中同样可以使用:
crontab -e 打开默认的执行文件,在文件中写入对应的定时任务,
多个任务已回车分割。
执行文件中的语法:
* * * * * php index.php
解析对应一下规则
分(0-24) 时(0-24) 日(1-31) 月(1-12) 周(1-7) php引擎 php文件
实例:
59 23 * * * /usr/local/php/bin/php /var/wwwroot/pekingpiao.php
每天的23:59分执行pekingpiao文件的功能
相关文章:
,请先登录查看所有评论- Linux命令 续 2018-03-14
- shell 命令 收集 中... 2017-06-27
- xargs结合find的使用 2017-05-26
- Linux命令之tail 2017-01-13
- centOS修改root 密码 2016-08-01
网友评论已关闭