【后台执行脚本】

#########################################################################
# File Name: task-daemon.sh
# Author: name
# Mail: [email protected]
# Created Time: 2023-04-07 17:25:03
# Edit Time: 2023-04-07 17:25:03
# Description: 
#########################################################################
#!/bin/bash
workDir=`dirname $0`
workDir=`cd ${workDir};pwd`



usage="Usage: task-daemon.sh (street_code:370303100000) "

# if no args specified, show usage
if [ $# -le 0 ]; then
  echo $usage
  exit 1
fi

street_code=$1
source /etc/profile

log="./logs/$street_code.log"

#echo "cd $workDir && nohup python3 /yisa_oe/person_bind_house/bind_house.py $street_code > $log 2>&1 &"
#cd $workDir &&  python3 bind_house.py $street_code 

echo "cd $workDir && nohup python3 /yisa_oe/person_bind_house/bind_house_batch.py $street_code > $log 2>&1 &"
cd $workDir &&  python3 bind_house_batch.py $street_code 






你可能感兴趣的:(运维开发)