联网找有人,靠谱
联网找有人,靠谱

路由器计划任务修改方法

2020-02-12

分享到:
{}

登录路由器的内置网页,在系统-->计划任务界面可以看到路由器出厂默认的几条计划任务。

 

路由器出厂默认计划任务说明:

*/20 * * * * /etc/init.d/Net_4G_Check.sh--------------------4G联网检测脚本,20分钟检测一次联网

*/15 * * * * /etc/test_log.sh----------------log记录

*/120 * * * * /etc/pddns/pddns_start.sh start &--------------动态域名服务

44 4 * * * /etc/init.d/sysreboot.sh &----------定时重启(可删改)

*/5 * * * * ps | grep "/usr/sbin/ntpd"  && /etc/init.d/sysntpd stop;------ntpd相关的是时间服务,同步路由器时间用的

0 */4 * * * /etc/init.d/sysntpd start; sleep 40; /etc/init.d/sysntpd stop;---------ntpd相关的是时间服务,同步路由器时间用的

 

 

计划任务列表的格式:

[minute] [hour] [day of month] [month] [day of week] [program to be run]

从左到右依次是分钟、小时、天、月、星期、要运行的脚本。

其中各个参数的取值范围是:

Ø minute(0-59)hour(0-23)day of month(1-31)month(1-12)day of week(0-7,0 or 7 is Sun)

Ø 每个参数里的取值可以有 4 种间隔符:

Ø * 表示任意       - 表示范围       , 表示枚举多个值       / 表示每隔

例如:

Ø 周一到周五每天晚上 23:30 执行 ifconfig ra0 down 指令(关掉 WiFi 网卡)

30 23 * * 1-5 ifconfig ra0 down

   每天444定时重启设备:

44 4 * * * /etc/init.d/sysreboot.sh &

相关产品

发表评论

姓  名*
邮  箱*
公  司  名 
评论内容*
验证码