This commit is contained in:
xyj 2024-01-06 16:37:21 +08:00
parent add148ffca
commit 73e0ba73ca
3 changed files with 6 additions and 6 deletions

View File

@ -6,8 +6,8 @@ user=pi
autostart=true autostart=true
;失败重启 ;失败重启
autorestart=true autorestart=true
;每隔一分钟执行一次 ;重启次数
interval=60 restart_times=3
redirect_stderr=true redirect_stderr=true
stopsignal=TERM stopsignal=TERM
stopasgroup=True stopasgroup=True

View File

@ -2,7 +2,7 @@
set -e set -e
sudo crontab -r sudo crontab -r
sudo crontab -l > cron.cron sudo crontab -l > cron.cron
echo "*/1 * * * * /usr/bin/bash /home/pi/lot_manager/conf/example/bash/start_dataupload_internal_one_hour.sh" >> cron.cron echo "*/2 * * * * /usr/bin/bash /home/pi/lot_manager/conf/example/bash/start_dataupload_internal_one_hour.sh" >> cron.cron
echo "0 0 * * * /usr/bin/python /home/pi/lot_manager/delete_lot_data_3_days.py" >> cron.cron echo "0 0 * * * /usr/bin/python /home/pi/lot_manager/delete_lot_data_3_days.py" >> cron.cron
# 64G的才加 # 64G的才加
echo "0 * * * * /usr/bin/bash /home/pi/lot_manager/bash/cron_delete_mp4.sh" >> cron.cron echo "0 * * * * /usr/bin/bash /home/pi/lot_manager/bash/cron_delete_mp4.sh" >> cron.cron

View File

@ -196,9 +196,9 @@ def get_data():
client.publish(publish_topic, payload=json.dumps(data, ensure_ascii=False), qos=0) client.publish(publish_topic, payload=json.dumps(data, ensure_ascii=False), qos=0)
add(t2) add(t2)
# 运行一次就把这个程序关掉 # 运行一次就把这个程序关掉
subprocess.Popen( # subprocess.Popen(
["/usr/bin/bash /home/pi/lot_manager/conf/example/bash/stop_dataupload_internal_one_hour.sh"], # ["/usr/bin/bash /home/pi/lot_manager/conf/example/bash/stop_dataupload_internal_one_hour.sh"],
shell=True) # shell=True)
except Exception as e: except Exception as e:
# print(e) # print(e)
pass pass