sudo mkdir /alidata/www/office/orderlog/
sudo chown www:www /alidata/www/office/orderlog/ -R
sudo chmod 777 /alidata/www/office/orderlog/ -R
sudo vim /alidata/www/office/allocate_order.sh
#!/bin/bash count=`ps aux|grep 'hh/auto-process-order'|grep -v 'grep'|wc -l` if [ 0 == ${count} ];then orderlog_dir=/alidata/www/office/orderlog/`date +%y%m%d`/ orderlog_file=${orderlog_dir}`date +%H` if [ ! -d ${orderlog_dir} ]; then mkdir -p ${orderlog_dir} fi if [ ! -f ${orderlog_file} ]; then touch ${orderlog_file} fi /alidata/server/php/bin/php /alidata/www/office/yii hh/auto-process-order >> ${orderlog_file} fi
sudo chown www:www /alidata/www/office/allocate_order.sh
crontab -e
*/1 * * * * /alidata/www/office/allocate_order.sh
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。