1234567891011121314151617181920212223242526272829 |
- source /etc/profile
- echo $ROV_OFFLINE_ENV
- log_dir="my_logs_alg_recsys_rank_item_realtime_1h_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_recsys_rank_item_realtime_1h.py $cur_time $cur_h
- elif [[ $ROV_OFFLINE_ENV == 'pro' ]]; then
- /root/anaconda3/bin/python alg_recsys_rank_item_realtime_1h.py $cur_time $cur_h
- if [ $? -ne 0 ]; then
- msg="写redis的任务,一层曝光/分享/回流到redis,用于排序,alg_recsys_rank_item_realtime_1h.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_recsys_rank_item_realtime_1h_task.sh
- # 32 * * * * cd /root/zhangbo/rov-offline/write_redis && /bin/sh alg_recsys_rank_item_realtime_1h_task.sh > my_logs_alg_recsys_rank_item_realtime_1h_task/$(date +\%Y-\%m-\%d_\%H_\%M).log 2>&1
|