source /etc/profile echo $ROV_OFFLINE_ENV log_dir="my_logs_alg_ad_feature_01_cid2action_redis_task" if [ ! -d ${log_dir} ]; then mkdir ${log_dir} fi cur_time="`date +%Y%m%d`" cur_h="`date +%H`" echo "开始执行时间:{$(date "+%Y-%m-%d %H:%M:%S")}" if [[ $ROV_OFFLINE_ENV == 'test' ]]; then /root/anaconda3/bin/python alg_ad_feature_01_cid2action_redis.py $cur_time $cur_h elif [[ $ROV_OFFLINE_ENV == 'pro' ]]; then /root/anaconda3/bin/python alg_ad_feature_01_cid2action_redis.py $cur_time $cur_h if [ $? -ne 0 ]; then msg="写redis的任务,ad广告的cid行为,alg_ad_feature_01_cid2action_redis.py:${cur_time}-${cur_h}-something-is-wrong." /root/anaconda3/bin/python utils_monitor.py ${msg} fi fi echo "结束执行时间:{$(date "+%Y-%m-%d %H:%M:%S")}" echo "all done" #sh alg_ad_feature_01_cid2action_redis_task.sh