Re: [shlug] CentOS下cron job凭空消失

43 views
Skip to first unread message
Message has been deleted

AR

unread,
Apr 15, 2014, 9:52:38 PM4/15/14
to sh...@googlegroups.com
2014-04-16 9:49 GMT+08:00 Hugh <boxx...@gmail.com>:
>
> 很妖的个事情,我在CentOS root用户下创建个cron job,运行了半个多月,昨天发现就crontab -l竟看不到了。有啥办法检查原因吗?

某所知道的没开历史记录(比如HISTCONTROL 等)基本就没办法了...

共用 or 一个人用?

非常有可能是他人 crontab 命令跟了一个空文件结果把原来的都删除了...


--
Silence is golden.

Shell Xu

unread,
Apr 15, 2014, 10:07:20 PM4/15/14
to shlug
是不是这个cronjob自己干的?


在 2014年4月16日 上午9:49,Hugh <boxx...@gmail.com>写道:

很妖的个事情,我在CentOS root用户下创建个cron job,运行了半个多月,昨天发现就crontab -l竟看不到了。有啥办法检查原因吗?



--
Hugh

--
-- You received this message because you are subscribed to the Google Groups Shanghai Linux User Group group. To post to this group, send email to sh...@googlegroups.com. To unsubscribe from this group, send email to shlug+un...@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/shlug?hl=zh-CN
---
您收到此邮件是因为您订阅了Google网上论坛中的“Shanghai Linux User Group”论坛。
要退订此论坛并停止接收此论坛的电子邮件,请发送电子邮件到shlug+un...@googlegroups.com
要查看更多选项,请访问https://groups.google.com/d/optout



--
彼節者有間,而刀刃者無厚;以無厚入有間,恢恢乎其於游刃必有餘地矣。
blog: http://shell909090.org/blog/

唐嘉祺

unread,
Apr 15, 2014, 10:17:28 PM4/15/14
to sh...@googlegroups.com
遇到过一种情况:crontab -e编辑的时候,突然终端断开了,然后crontab就被清空了。

AR

unread,
Apr 15, 2014, 10:23:42 PM4/15/14
to sh...@googlegroups.com
2014-04-16 10:17 GMT+08:00 唐嘉祺 <tjq9...@gmail.com>:
> 遇到过一种情况:crontab -e编辑的时候,突然终端断开了,然后crontab就被清空了。

顺道提一下,这种情况 /var/spool/cron 下的可能清空了,但编辑的临时文件还在 /tmp/crontab.xxxxx 下, 后面
xxxxx 部分随机,如果打开的编辑器显示当前编辑文件路径就可以看到。 就是说还有那么点机会补救 orz

--
Silence is golden.
Message has been deleted
Message has been deleted

AR

unread,
Apr 15, 2014, 10:40:58 PM4/15/14
to sh...@googlegroups.com
2014-04-16 10:27 GMT+08:00 Hugh <boxx...@gmail.com>:
> 不是一台机器。。。是二十多台机器都遇到这一情况。因为部署的时间差不多。我在想难道centos上有些/etc/cron.weekly或者monthly的清理工具?

默认是不会的。

多台机器都出现一样的问题? 是否有统一管理机器配置的系统做出这种类似的操作呢? 比如用 puppet 之类的有过这样的操作。

--
Silence is golden.
Reply all
Reply to author
Forward
Message has been deleted
0 new messages