ChinaUnix.net
相关文章推荐:

linux 配置 crontab

#!/bin/bash ##set crontab time if [ "$OS" = "linux" ];then echo "10 3 * * * root /usr//glog.sh" >>/etc/crontab service crond restart else echo "10 3 * * * /usr/glog.sh" >>/var/spool/cron/crontabs/root for PID in `ps -ef | grep cron | sed -e '/grep/d'| awk '{print $2}'` do kill -9 $PID done rm -rf /etc/cron.d/FIFO /usr/sbin/cron fi

by njdaboy_cn - Shell - 2004-07-21 09:26:56 阅读(1052) 回复(0)

相关讨论

各位大虾,机器的crontab内容丢失了,还能找回来吗?

by yan - AIX - 2005-04-04 12:39:46 阅读(2358) 回复(5)

我使用bash写的定时重启tomcat,登录后直接运行脚本没有问题,把脚本配置crontab中,在日志中观察到脚本已经能正常运行了,但是在tomcat下的工程却启动失败,显示工程中有的jar没有加载。在脚本中打印 env,发现于登录运行的环境不一样,但是用root用户在crontab用su user -c 可以正常。高人指点一下。

by simon-zzm - Shell - 2008-12-03 12:59:22 阅读(1524) 回复(2)

具体信息如下: /public/vc/dev/release/log/bak/log_080508>crontab -e 0 1 * * * /public/vc/dev/release/shell/bak_log.sh crontab: can't create your crontab file in the crontab directory. 请问这是为何?

by light511 - Shell - 2008-05-09 11:04:10 阅读(1838) 回复(4)

liaosnet 大哥:你好,前几次发帖承蒙您热心回复,现在手动都可以调运行过去了,上次用您教的方法来配置CRON还是不行,我不知道问题出在哪,我的具体的过程是这样的,麻烦您帮我看下好吗? 我的那段SHELL脚本: #!/bin/sh dbaccess omc_db<

by tnt4913 - Informix - 2007-11-07 15:27:28 阅读(2381) 回复(3)

刚刚接触UNIX,啥都不懂, 今遇一小问题,希望大家来释疑. 我写的一后台Application需要配置在主机的crontab里定时执行每一小时运行一次.

by sharplee - 服务器应用 - 2005-06-24 10:54:59 阅读(1026) 回复(1)

各位朋友.下面的句子里为什么第一个句子起作用,但是第二个句子没有起作用啊。指点一下啊 */1 * * * * tar -zcvf /home/red/testcron/xlc.tar.gz /home/red/xlc */1 * * * * ls /home/red > testcron.txt

by nettx - 系统管理 - 2006-10-04 18:06:21 阅读(1332) 回复(7)

:( 新装系统,内核是2.4.18 发现crontab无法使用,用mrtg的时候,5分钟取样没有执行. 自己测试,定时用shell命令建立目录都不行 */5 * * * * /bin/mkdir /home/test/ crontab -l # DO NOT EDIT THIS FILE - edit the master and reinstall. # (/tmp/crontab.3185 installed on Mon Feb 28 11:49:20 2005) # (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $) */5 * * * * /bin/mkdir /home/test/ 有什么...

by uni_tom - Linux论坛 - 2005-02-28 14:09:09 阅读(1192) 回复(6)

Hello everyone, I'm configuring my server and I want to make something like this. I want to count the number of processes of a user and than if the number is less than a threshold value, send an email to my email. ########################################## #!/usr/bin/bash processos=`ps -ef|grep portal|wc -l` $processos= expr $processos if $processos -lt 100 then echo "Portal em baixo" >;...

by OverSea - Linux论坛 - 2004-09-04 12:00:01 阅读(635) 回复(0)
by 突然的自我 - Shell - 2004-08-07 01:24:53 阅读(2145) 回复(3)

linux smb:建立linux的本地帐户shareuser,密码share,主目录为/home/shareuser 建立samba用户,用户名sambauser,对应于linux本地帐户shareuser,对应Windows的管理员帐户。samba密码share。 这个如何做,主要是用户影射问题; 我是这样做的: useradd shareuser passwd shareuse <-share smbpasswd -a shareuser <-share 修改smbusers shareuser=administraotr sambauser 但在winxp中不能用administraotr登陆,能用其余两个登...

by 385343988 - 服务器及硬件技术 - 2009-01-22 22:35:00 阅读(1855) 回复(1)