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