change timing

This commit is contained in:
Jan-Ole Hübner 2024-08-18 01:18:19 +02:00
parent 9fa7581574
commit 9d3afcd801
3 changed files with 8 additions and 6 deletions

View file

@ -21,7 +21,7 @@ ch.setFormatter(formatter)
logger.addHandler(ch) logger.addHandler(ch)
logger.setLevel(logging.INFO) logger.setLevel(logging.INFO)
__version__ = "v0.3.0" __version__ = "v0.4.0"
logger.info(__version__) logger.info(__version__)
client = InfluxDBClient(url=URL, token=TOKEN, org=ORG) client = InfluxDBClient(url=URL, token=TOKEN, org=ORG)

View file

@ -25,7 +25,7 @@ ch.setFormatter(formatter)
logger.addHandler(ch) logger.addHandler(ch)
logger.setLevel(logging.INFO) logger.setLevel(logging.INFO)
__version__ = "v0.3.4" __version__ = "v0.4.0"
logger.info(__version__) logger.info(__version__)

View file

@ -2,13 +2,15 @@
python3 /app/pulse.py & 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 while true; do
python3 /app/get_price.py current_minute=$(date +'%M')
sleep 900 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 done
) & ) &
wait -n wait -n