Linux计划任务每半小时访问一个网址

请问怎样写命令 让Linux计划任务每半小时访问一个网址,就是在浏览器发送一个请求:比如访问:
http://localhost:8080/XXXX/xxxxx.do?method=XXX
多谢了

首先要安装zhcon软件包,然后就可以使用lynx访问网页了,比如:
lynx www.baidu.com
任务设置:
1、crontab -e进入任务编辑界面
2、编辑任务内容
30 * * * * lynx www.baidu.com
3、启动定时任务
service crond start
温馨提示:答案为网友推荐,仅供参考
第1个回答  2010-05-28
确认有wget,首先输入:
crontab -e
然后输入
20,50 * * * * /usr/bin/wget "http://localhost:8080/XXXX/xxxxx.do?method"
表示,每个小时的20分和50分获取网页的内容,如果复杂的可以用curl。
不明白Hi
第2个回答  2010-05-28
crontab+wget就行。
crontab可以帮助你在任意时刻由系统启动命令或者脚本。
wget可以抓取页面。
相似回答