• WAP手机版 保存到桌面加入收藏设为首页
路由器

openwrt计划任务路由器定时自动重启

时间:2016-06-12 14:49:46   作者:哎丫丫转载   阅读:8116   评论:0
内容摘要:107***sleep5&&touch/etc/banner&&reboot//每天7点10分路由器自动重启02***wifidown//每天2点路由器关闭wifi07***wifiup//每天7点路由器开启wifi五分钟执行*/5****每小时执行0****每天执行00***每周执行0...
10 7 * * * sleep 5 && touch /etc/banner && reboot   //每天7点10分路由器自动重启

0 2 * * * wifi down                                                       //每天2点路由器关闭wifi

0 7 * * * wifi up                                                           //每天7点路由器开启wifi


五分钟执行  */5 * * * *

每小时执行     0 * * * *

每天执行        0 0 * * *

每周执行       0 0 * * 0

每月执行        0 0 1 * *

每年执行       0 0 1 1 *


crontab文件的一些例子: 
      30 21 * * * /usr/local/etc/rc.d/lighttpd restart 
      上面的例子表示每晚的21:30重启apache。
 
      45 4 1,10,22 * * /usr/local/etc/rc.d/lighttpd restart 
     上面的例子表示每月1、10、22日的4 : 45重启apache。 

     10 1 * * 6,0 /usr/local/etc/rc.d/lighttpd restart 
    上面的例子表示每周六、周日的1 : 10重启apache。 

     0,30 18-23 * * * /usr/local/etc/rc.d/lighttpd restart 
    上面的例子表示在每天18 : 00至23 : 00之间每隔30分钟重启apache。 

     0 23 * * 6 /usr/local/etc/rc.d/lighttpd restart 
    上面的例子表示每星期六的11 : 00 pm重启apache。 

     * */1 * * * /usr/local/etc/rc.d/lighttpd restart 
    每一小时重启apache 

    * 23-7/1 * * * /usr/local/etc/rc.d/lighttpd restart 
    晚上11点到早上7点之间,每隔一小时重启apache 

    0 11 4 * mon-wed /usr/local/etc/rc.d/lighttpd restart 
    每月的4号与每周一到周三的11点重启apache 

    0 4 1 jan * /usr/local/etc/rc.d/lighttpd restart 
    一月一号的4点重启apache 



c后重新启动路由器或者手动重新启动cron服务生效

/etc/init.d/cron restart

   版权声明,所有转载都有注明出处,本站不负责承担任何法律责往。若有侵权,请联系我。我会及时删除。

电脑维护,系统安装,软 、硬件维修,电脑配件,零售业务,网站建设,路由器安装设置 服务器维护,电脑、网络维护,智能手机刷机,安装WIFI 调试!郴州网站建设 小程序搭建 郴州电脑维修

        咨询电话:18175576644  点击这里给我发消 息
   扫描二维码。关注公众号,小程序
       享受星级服务   

手机点击二维码关注
      


手机点击打开小程序
      


相关评论
免责申明:本站部分资料来源互联网,如果侵犯了您的版权,请作者速来电或QQ与本站联系,我们将第一时间给予以改正或删除。

Copyright © 2020 哎丫丫电脑 All Rights Reserved 
 工信部备案:湘ICP备14010293号-1