diff --git a/get_price.py b/get_price.py index 56d9aca..a41a2c6 100644 --- a/get_price.py +++ b/get_price.py @@ -21,7 +21,7 @@ ch.setFormatter(formatter) logger.addHandler(ch) logger.setLevel(logging.INFO) -__version__ = "v0.3.0" +__version__ = "v0.4.0" logger.info(__version__) client = InfluxDBClient(url=URL, token=TOKEN, org=ORG) diff --git a/pulse.py b/pulse.py index 338a4a1..cd08f9f 100644 --- a/pulse.py +++ b/pulse.py @@ -25,7 +25,7 @@ ch.setFormatter(formatter) logger.addHandler(ch) logger.setLevel(logging.INFO) -__version__ = "v0.3.4" +__version__ = "v0.4.0" logger.info(__version__) diff --git a/start.sh b/start.sh index 4a78868..1ac5d74 100644 --- a/start.sh +++ b/start.sh @@ -2,13 +2,15 @@ python3 /app/pulse.py & -# Run the other script periodically in the background +# Run the other script at 0, 15, 30, 45, and 60 minutes ( while true; do - python3 /app/get_price.py - sleep 900 + current_minute=$(date +'%M') + if [[ "$current_minute" == "00" || "$current_minute" == "15" || "$current_minute" == "30" || "$current_minute" == "45" || "$current_minute" == "00" ]]; then + python3 /app/get_price.py + fi + sleep 60 # Check every minute done ) & - wait -n