linux crontab定时执行

#利用crontab定时执行url研究了两种简单方式
#一利用lynx访问url

yum install lynx
service crond start
crontab -e
insert键
* * * * * lynx -dump http://192.168.0.10/gas_station_erp/index.php/socket/SendDev/getDevInfo
esc :wq
service crond restart

#* * * * * 表示每分钟执行一次

#二调用sh脚本

service crond start
crontab -e
insert键
0,10,20,30,40,50 * * * * /download/dalian/cron/sync_getDevInfo.sh
esc :wq
service crond restart

#0,10,20,30,40,50 * * * *表示每小时的0分,10分,20分....执行

#sync_getDevInfo.sh 中内容

#!/bin/bash
wget http://admin.jienuo-service.net/gas_station_erp/index.php/socket/SendDev/getDevInfo

原文地址:https://www.cnblogs.com/dreamhome/p/3905902.html