[英]Linux: Crontab Job without Interfering with Sys Admin's Jobs?
I need to create a new crontab job in a Redhat Linux environment. 我需要在Redhat Linux环境中创建一个新的crontab作业。 I have sudo access to that but I don't think I can do everything on that system--some higher level sys admins, for example, disable any firewall changes I make.
我对此拥有sudo的访问权限,但我认为我无法在该系统上做任何事情-例如,某些高级sys管理员禁止我所做的任何防火墙更改。
So here is my crontab command: 所以这是我的crontab命令:
crontab e
and that brings up a screen like: 并显示如下屏幕:
33 2 * * * /usr/bin/cu-firewall update > /dev/null 2>&1
30 1 * * * /root/update_atbi_website > /dev/null
0 4 * * * /home/prov356/scripts/opnforumbackup
I want to not send email and I have done it successfully in my local VM: 我不想发送电子邮件,并且已经在本地VM中成功完成了发送电子邮件:
MAILTO=""
# execute 15 minute
*/15 * * * * perl /db_xenia/pl/get_usgs.pl
Question: If I were to append the above to the existing crontab info will it prevent sending of emails to the sys admin too? 问题:如果我将上述内容附加到现有的crontab信息中,是否还会阻止向sys admin发送电子邮件? I don't want to get into trouble!
我不想惹麻烦! Perhaps, I could append /dev/null after my Perl commands?
也许,我可以在Perl命令之后附加/ dev / null?
Thanks. 谢谢。
Never mind: Per @Basile's comment, I didn't need to be sudo. 没关系:根据@Basile的评论,我不需要是sudo。 So I logged in as non-sudo and ran
crontab -e
; 所以我以非sudo身份登录并运行
crontab -e
; this time there were no sys admin entries. 这次没有系统管理员条目。 So I simply entered my own configs, saved, and the cronjob seems to be running fine.
所以我只是输入了自己的配置,保存了,cronjob看起来运行良好。
Thanks. 谢谢。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.