linux定时任务

格式

*  *  *  *  *  command
分  时   日   月   周   命令

 

如果星号后面加 /数字,就是当时量级的数量

 

例如:

一分钟执行一次

*/1  *  *  *  *  command

 

一小时执行一次

*  */1  *  *  *  command

 

 

 

添加定时计划任务

crontab -e

 

举个粟子:

* * * * * /alidata/server/php/bin/php /data/www/ttt.php
*/1 * * * * curl http://www.aabb.com/index.php/order-ttt.html

(注:第一种是调用php程序来执行php文件脚本,第二种是使用curl来访问网页链接来执行脚本)

posted @ 2016-05-31 18:10  Tiac  阅读(183)  评论(0)    收藏  举报