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

创新互联建站主要从事成都网站制作、网站设计、网页设计、企业做网站、公司建网站等业务。立足成都服务乐业,十年网站建设经验,价格优惠、服务专业,欢迎来电咨询建站服务:18982081108

#!/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


网页题目:php后台服务防止交叉执行
URL网址:http://csruizhi.cn/article/picojs.html

其他资讯

Copyright © 2007-2024 成都优众联杰科技有限公司 All Rights Reserved 蜀ICP备2024116266号
友情链接: 成都网站制作 企业网站设计 梓潼网站设计 成都网站制作 网站制作公司 成都品牌网站建设 成都网站制作 上市集团网站建设 成都网站设计公司 手机网站建设 网站设计制作报价 高端品牌网站建设 成都网站设计 定制网站建设多少钱 手机网站制作 成都网站建设 响应式网站建设 高端网站设计 定制网站设计 网站制作 重庆网站建设 成都网站制作