This commit is contained in:
xyj 2024-01-06 16:57:12 +08:00
parent e3dbd2d0a2
commit d011b162dc
4 changed files with 2 additions and 9 deletions

View File

@ -3,7 +3,7 @@ directory=/home/pi/lot_manager
command=/usr/bin/python data_upload.py
user=pi
;是否随开机自启 或者reload自启动
autostart=false
autostart=true
;失败重启
autorestart=true
;重启次数

View File

@ -8,11 +8,6 @@ autostart=true
autorestart=true
;重启次数
restart_times=3
;暂时改一下!!
;启动后60秒没有异常就退出
startsecs=100
; 间隔30秒执行一次任务
interval=20
redirect_stderr=true
stopsignal=TERM
stopasgroup=True

View File

@ -1,6 +1,4 @@
#!/bin/bash
set -e
sudo crontab -r
sudo crontab -l > cron.cron
echo "0 * * * * /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

View File

@ -206,7 +206,7 @@ def get_data():
def p():
while True:
time.sleep(10)
time.sleep(54)
try:
data = {'ambient_temperature': 1,
'ambient_humidity': 1,