当前位置: 技术问答>linux和unix
crontab 不执行,但是手动可以执行请各位看看什么原因!
来源: 互联网 发布时间:2016-02-29
本文导语: 我建了一个crontab,但是从来都启动过,但是手工可以执行! ------------------------------------------------------------- TERM=vt100;export TERM ORACLE_TERM=vt100;export ORACLE_TERM ORACLE_OWNER=oracle;export ORACLE_OWNER ORACLE_BASE=/oracle/app;export ORACLE_...
我建了一个crontab,但是从来都启动过,但是手工可以执行!
-------------------------------------------------------------
TERM=vt100;export TERM
ORACLE_TERM=vt100;export ORACLE_TERM
ORACLE_OWNER=oracle;export ORACLE_OWNER
ORACLE_BASE=/oracle/app;export ORACLE_BASE
ORACLE_HOME=/oracle/app;export ORACLE_HOME
ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data;export ORA_NLS33
NLS_LANG="simplified chinese_china.ZHS16GBK";export NLS_LANG
ORACLE_SID=mhcc1;export ORACLE_SID
LD_LIBRARY_PATH=/oracle/app/lib:/oracle/app/network/lib:/oracle/app/rdbms/lib;export LD_LIBRARY_PATH
PATH=$PATH:$ORACLE_HOME/bin:/usr/ccs/bin:/usr/local/bin;export PATH
echo "Checking smMain:"
#Checking ...
IS_RUN=`ps -ef | grep "./smMain start sm1258.ini" | grep -v grep | awk '{print $2 }' `
if [ "X${IS_RUN}" = "X" ]; then
echo "Now start smMain ..."
cd /home/mhsys/smMain
./smMain start sm1258.ini &
else
echo "smMain is already running ..."
fi
-------------------------------------------------------------
TERM=vt100;export TERM
ORACLE_TERM=vt100;export ORACLE_TERM
ORACLE_OWNER=oracle;export ORACLE_OWNER
ORACLE_BASE=/oracle/app;export ORACLE_BASE
ORACLE_HOME=/oracle/app;export ORACLE_HOME
ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data;export ORA_NLS33
NLS_LANG="simplified chinese_china.ZHS16GBK";export NLS_LANG
ORACLE_SID=mhcc1;export ORACLE_SID
LD_LIBRARY_PATH=/oracle/app/lib:/oracle/app/network/lib:/oracle/app/rdbms/lib;export LD_LIBRARY_PATH
PATH=$PATH:$ORACLE_HOME/bin:/usr/ccs/bin:/usr/local/bin;export PATH
echo "Checking smMain:"
#Checking ...
IS_RUN=`ps -ef | grep "./smMain start sm1258.ini" | grep -v grep | awk '{print $2 }' `
if [ "X${IS_RUN}" = "X" ]; then
echo "Now start smMain ..."
cd /home/mhsys/smMain
./smMain start sm1258.ini &
else
echo "smMain is already running ..."
fi
|
出于测试目的新创建了一条 Cron JOB, 时间间隔必须超过两分钟,否则 JOB 将调度不到。如果必须忽略这两分钟的载入配置时间差,可以通过重新启动 Cron Daemon 做到。