智能路由器怎么设置定时重启、开机,命令大全
目前智能路由器的固件一般基于linux系统,因此可以利用linux系统的crontab来设置定时任务。
你可以在定制固件的高级设置中设置定时任务,可以灵活的控制路由器,比如重启、开关wifi等。
定时任务采用crontab规则,你可以百度搜索具体信息。基本规则:
分 时 日 月 星期 要运行的命令
‘*’表示匹配所有,‘/’表示每隔多少
如每天3:30重启:
30 3 * * * reboot
每隔3天3:30重启:
30 3 */3 * * reboot
每月1日5:00重启
0 5 1 * * reboot
每周一5:00重启
0 5 * * 1 reboot
每天0:30关闭wifi:
30 0 * * * wifi down
每天7:30开wifi:
30 7 * * * wifi up
以K2为例可能用到的一些命令,其他路由器命令可能有所不同:
重启:reboot ;开wifi:wifi up;关wifi:wifi down
PPPOE拨号重拨:
killall pppd
关5G:
uci set wireless.mt7612e.disabled=1 ;uci commit;sleep 1;wifi reload
开5G:
uci set wireless.mt7612e.disabled=0 ;uci commit;sleep 1;wifi reload
关2.4G:
uci set wireless.mt7620.disabled=1 ;uci commit;sleep 1;wifi reload
开2.4G:
uci set wireless.mt7620.disabled=0 ;uci commit;sleep 1;wifi reload
开访客网络:
uci set wireless.@wifi-iface[2].disabled=0;uci commit;sleep 1;wifi reload
关访客网络:
uci set wireless.@wifi-iface[2].disabled=1;uci commit;sleep 1;wifi reload
断LAN:ifconfig eth0.1 down 开LAN:ifconfig eth0.1 up
断WAN:ifconfig eth0.2 down 开WAN:ifconfig eth0.2 up
断中继:ifconfig apcli0 down 开中继:ifconfig apcli0 up
关指示灯:
uci set light_manage.pagelight.ignore=0 ;uci commit;sleep 1;/etc/init.d/light_manage restart
开指示灯:
uci set light_manage.pagelight.ignore=1 ;uci commit;sleep 1;/etc/init.d/light_manage restart
重启adbyby:
/etc/init.d/adbyby stop;sleep 1;/etc/init.d/adbyby start