#!/bin/bash function log() { local time_now=`date '+%Y-%m-%d %H:%M:%S'` echo "$time_now [src] [info] $1" >> /mnt/youtube_prod/running.log } cd /mnt/youtube_prod/src start=`date '+%Y-%m-%dT%H:%M:%SZ' -d'-1 day'` end=`date '+%Y-%m-%dT%H:%M:%SZ'` log "开始执行src...startTime:"$start",endTime:"$end # /mnt/youtube_prod/start_src.sh nohup python3 ./main.py --db="../db/youtube_prod.db" --logDir="./logs" --start=$start --end=$end >/dev/null 2>/mnt/youtube_prod/err.log &