diff --git a/conf/common/data_upload.conf b/conf/common/data_upload.conf index 07b068d..e60cab4 100644 --- a/conf/common/data_upload.conf +++ b/conf/common/data_upload.conf @@ -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 ;重启次数 diff --git a/conf/common/sensor_to_server.conf b/conf/common/sensor_to_server.conf index 69dc0b4..8fb9d6e 100644 --- a/conf/common/sensor_to_server.conf +++ b/conf/common/sensor_to_server.conf @@ -8,11 +8,6 @@ autostart=true autorestart=true ;重启次数 restart_times=3 -;暂时改一下!! -;启动后60秒没有异常就退出 -startsecs=100 -; 间隔30秒执行一次任务 -interval=20 redirect_stderr=true stopsignal=TERM stopasgroup=True diff --git a/conf/example/bash/cron_set_for_64G.sh b/conf/example/bash/cron_set_for_64G.sh index fe4da1f..1b7ebef 100644 --- a/conf/example/bash/cron_set_for_64G.sh +++ b/conf/example/bash/cron_set_for_64G.sh @@ -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 diff --git a/sensor_to_server.py b/sensor_to_server.py index 3703320..feb9b7c 100755 --- a/sensor_to_server.py +++ b/sensor_to_server.py @@ -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,