#!/bin/bash
source /etc/profile
source ~/.bash_profile
source /home/suoni/bp/bin/env.sh
export LANG=zh_CN.GB18030
REPORT_HOME="/home/****/report"
for name in $REPORT_HOME/*
do
if [ -d "$name" ]; then
if [ -s "$name/jrc_job.status" ]; then
echo `date +"%Y-%m-%d %H:%M:%S"`" : run . $name/jrc_job.sh"
. $name/jrc_job.sh
fi
fi
done
for name in $REPORT_HOME/*/*
do
if [ -d "$name" ]; then
if [ -s "$name/jrc_job.status" ]; then
echo `date +"%Y-%m-%d %H:%M:%S"`" : run $name/jrc_job.sh"
. $name/jrc_job.sh
fi
fi
done
sh $REPORT_HOME/jrc_report_main.sh
~
crontab -l;crontab -e
SHELL=/bin/bash
PATH=/bin:/sbin:/usr/sbin:/usr/bin
08 9-19 * * * . /home/changchun.wzj/report/jrc_job_hour.sh
11 20-23 * * * . /home/changchun.wzj/report/tc_dpc_trade_hour/hour2.sh
11 00-08 * * * . /home/changchun.wzj/report/tc_dpc_trade_hour/hour2.sh
05 09 * * * . /home/changchun.wzj/report/hivesql/purchase_order.sh
05 09 * * * . /home/changchun.wzj/report/hivesql/supplier_product.sh
01 09 * * * . /home/changchun.wzj/report/sync.sh
20 09 * * * . /home/changchun.wzj/report/jrc_job_main.sh
#02 09 * * * . /home/changchun.wzj/report/common_table.sh
#!/bin/bash
source /etc/profile
source ~/.bash_profile
if [ "$1" = "" ]; then
echo "source file is null"
else
scp -r /home/changchun.wzj/$1 changchun.wzj@172.24.102.210:/home/changchun.wzj/report_gateway/$2
fi