找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888
查看: 2602|回复: 21

对Linux精通的进,我需要定时重复执行一条指令,求方法!

[复制链接]
发表于 2020-8-1 11:30 | 显示全部楼层 |阅读模式
已装好Openwrt,但是频繁的管理端页面无法进。 出现下列错误信息,这个是老问题了,找了好久也没有根治的方法。



目前只有通过进SSH执行一次  rm -r /tmp/luci-indexcache  后,才可以恢复进入。但是几分钟后又没法进了,又要再执行一次。太麻烦。


我需要有个定时重复执行这条指令的方法(比如每隔2分钟自动执行一次)。这样也算曲线解决这个问题了。


谁知道怎么弄的,麻烦详细点说明操作步骤,本人小白一个。

谢谢

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

×
我的恩山、我的无线 The best wifi forum is right here.
发表于 2020-8-1 11:34 | 显示全部楼层
crond定时任务试试或者高端点用openwet自带的uloop定时器刷任务

点评

大锅求详操方法教程,手把手那种  详情 回复 发表于 2020-8-1 11:38
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2020-8-1 11:38 | 显示全部楼层
jrglinux 发表于 2020-8-1 11:34
crond定时任务试试或者高端点用openwet自带的uloop定时器刷任务

大锅求详操方法教程,手把手那种
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2020-8-1 11:41 | 显示全部楼层
本帖最后由 jrglinux 于 2020-8-1 11:47 编辑

crontab -e */2 * * * * rm -r /tmp/luci-indexcache   

点评

root@OpenWrt:~# */2 * * * * rm -r /tmp/luci-indexcache -ash: */2: not found 好像不行  详情 回复 发表于 2020-8-1 11:45
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2020-8-1 11:45 | 显示全部楼层
jrglinux 发表于 2020-8-1 11:41
*/2 * * * * rm -r /tmp/luci-indexcache

root@OpenWrt:~# */2 * * * * rm -r /tmp/luci-indexcache
-ash: */2: not found

好像不行

点评

是*/2 * * * * rm -f /tmp/luci-indexcache  详情 回复 发表于 2020-8-1 11:54
是放到 系统,计划任务 里  详情 回复 发表于 2020-8-1 11:49
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2020-8-1 11:49 | 显示全部楼层
micyao 发表于 2020-8-1 11:45
root@OpenWrt:~# */2 * * * * rm -r /tmp/luci-indexcache
-ash: */2: not found

是放到 系统,计划任务 里
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2020-8-1 11:54 | 显示全部楼层
本帖最后由 wulishui 于 2020-8-1 12:05 编辑
micyao 发表于 2020-8-1 11:45
root@OpenWrt:~# */2 * * * * rm -r /tmp/luci-indexcache
-ash: */2: not found


0/2 * * * * rm -f /tmp/luci-indexcache
-r 当文件被占用之类时就要确认,不然不会删除
-f 忽略一切干扰,干到底

这个论坛的文本编辑老子受够了,按enter不能换行的,非要shift+enter!

点评

是这样对吗? [attachimg]404492[/attachimg]  详情 回复 发表于 2020-8-1 12:38
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2020-8-1 12:06 | 显示全部楼层
换个谷歌浏览器试试。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2020-8-1 12:38 | 显示全部楼层
wulishui 发表于 2020-8-1 11:54

0/2 * * * * rm -f /tmp/luci-indexcache
-r 当文件被占用之类时就要确认,不然不会删除

是这样对吗?


本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

×

点评

放到计划任务里,不是本地启动脚本。  详情 回复 发表于 2020-8-27 16:21
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2020-8-1 12:58 | 显示全部楼层
别人说的是直接执行这行代码,不是放启动项里,而且你把前面的命令"crontab -e"都丢了
  1. crontab -e */2 * * * * rm -r /tmp/luci-indexcache
复制代码

我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2020-8-1 13:07 | 显示全部楼层
牛逼666666
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2020-8-22 22:23 来自手机 | 显示全部楼层
我也是无限重复的出现这个错误,试了各种方法无效,到最后改了旁路的ip地址,到现在还没有出现错误,继续观察中
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2020-8-23 04:08 | 显示全部楼层
这是什么神操作
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2020-8-23 14:04 来自手机 | 显示全部楼层
Linux的定时任务啊,就像Windows的那个
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2020-8-24 12:51 | 显示全部楼层
ssh登录,crontab -e 回车按键,a按键, */2 * * * * rm -r /tmp/luci-indexcache  ESC按键,:按键 ,wq回车

点评

谢谢这种手把手的教程,就需要你这样的多点才好lol  详情 回复 发表于 2020-8-24 18:54
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

有疑问请添加管理员QQ86788181|手机版|小黑屋|Archiver|恩山无线论坛(常州市恩山计算机开发有限公司版权所有) ( 苏ICP备05084872号 )

GMT+8, 2024-4-26 08:55

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

| 江苏省互联网有害信息举报中心 举报信箱:js12377 | @jischina.com.cn 举报电话:025-88802724 本站不良内容举报信箱:68610888@qq.com 举报电话:0519-86695797

快速回复 返回顶部 返回列表