1.定时jar程序
a.脚本
run.sh
#!/bin/sh
if [ `ps -ef |grep cn.com.flaginfo.Main |grep $1 |grep -v grep |wc -l` == 0 ]; then
(cd `dirname $0`;
for jar in ./lib/*.jar; do
classpath="$classpath:$jar"
done
classpath="$classpath:./bin"
CLASSPATH="$classpath"
export CLASSPATH
/opt/java/bin/java cn.com.flaginfo.Main $* )
else
echo "coupon update operation is running"
fi
b.结构
--bin
--llb
--run.sh
3.定时脚本
*/1 * * * * sh /opt/yxt/web/jiangxi_yingtan/run.sh SmsSendCron > /dev/null 2>&1