Chinaunix

标题: 0 1 * * * /home/oracle/ss.h 急 [打印本页]

作者: zhb1980415    时间: 2004-08-13 09:58
标题: 0 1 * * * /home/oracle/ss.h 急
我写两个shell ,放到定时队列中

*/5 * * * * /home/oracle/ss.sh
0    2  * * * /home/oracle/aa.sh
定时队列只执行第一个,不执行第二个,请问个伟大下怎样解决。
作者: q1208c    时间: 2004-08-13 10:37
标题: 0 1 * * * /home/oracle/ss.h 急
先看看那个script 能不能在命令行执行,然后再看看它是不是要什么环境变量,因为cron的变量和已经login的是不一样的,所以有时会无法运行的。/var/log/messages 里应该有报错才对。
作者: zhb1980415    时间: 2004-08-13 11:12
标题: 0 1 * * * /home/oracle/ss.h 急
命令行可以执行
作者: q1208c    时间: 2004-08-13 11:14
标题: 0 1 * * * /home/oracle/ss.h 急
那 /var/log/messages 里有什么错呢?  还有,会有mail 给你的呀。
作者: zhb1980415    时间: 2004-08-13 11:37
标题: 0 1 * * * /home/oracle/ss.h 急
Aug 12 03:01:45 localhost sshd(pam_unix)[23370]: session opened for user oracle by (uid=0)
Aug 12 03:03:14 localhost sshd(pam_unix)[23370]: session closed for user oracle
Aug 12 03:20:33 localhost sshd(pam_unix)[23463]: session opened for user oracle by (uid=0)
Aug 12 03:22:08 localhost sshd(pam_unix)[23463]: session closed for user oracle
作者: zhb1980415    时间: 2004-08-13 12:02
标题: 0 1 * * * /home/oracle/ss.h 急
From oracle  Fri Aug 13 11:40:44 2004
Return-Path: <oracle@localhost.localdomain>;
Received: (from oracle@localhost)
        by localhost.localdomain (8.11.6/8.11.6) id i7D3e1U29750
        for oracle; Fri, 13 Aug 2004 11:40:01 +0800
Date: Fri, 13 Aug 2004 11:40:01 +0800
Message-Id: <200408130340.i7D3e1U29750@localhost.localdomain>;
From: root@localhost.localdomain (Cron Daemon)
To: oracle@localhost.localdomain
Subject: Cron <oracle@localhost>; /home/oracle/unicom/shell/bin/sum.sh ;
X-Cron-Env: <SHELL=/bin/sh>;
X-Cron-Env: <HOME=/home/oracle>;
X-Cron-Env: <ATH=/usr/bin:/bin>;
X-Cron-Env: <LOGNAME=oracle>;

hell world
end success!
作者: q1208c    时间: 2004-08-13 12:06
标题: 0 1 * * * /home/oracle/ss.h 急
这不是成功了么?

它可不会打到shell里的。
作者: zhb1980415    时间: 2004-08-13 14:07
标题: 0 1 * * * /home/oracle/ss.h 急
谢谢




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2