Quantcast
Channel: CodeSection,代码区,Linux操作系统:Ubuntu_Centos_Debian - CodeSec
Viewing all articles
Browse latest Browse all 11063

CentOS如何设置crontab定时访问一个网址?

$
0
0

linux crontab函数语法

假设希望每隔3分钟就访问一个网站, 在linux下, 可以用:

crontab -e

然后输入如下命令:

*/3 * * * *  curl  http://www.baidu.com

其中*/3 表示每3分钟访问一次. curl将http的内容(html)返回输出.


Viewing all articles
Browse latest Browse all 11063

Trending Articles