php后台服务防止交叉执行
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/bashcount=`psaux|grep'hh/auto-process-order'|grep-v'grep'|wc-l`if[0==${count}];thenorderlog_dir=/alidata/www/office/orderlog/`date+%y%m%d`/orderlog_file=${orderlog_dir}`date+%H`if[!-d${orderlog_dir}];thenmkdir-p${orderlog_dir}fiif[!-f${orderlog_file}];thentouch${orderlog_file}fi/alidata/server/php/bin/php/alidata/www/office/yiihh/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
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。