I am reading data from a BACnet thermostat and storing values in an sqlite3 database ~ every minute using the schedule library. I realized that the task keeps running even after I close the Chrome browser running Jupyter Lab and the terminal window. In my case this is a good thing but I assume this is unexpected operation since there are other questions posted on how to intentionally cause this to happen. Is this expected operation? I have to assume it is either bac0 or the schedule library keeping the process alive but that is my question. I'm running Linux Mint.
import time
from datetime import datetime
import schedule
import BAC0
import sqlite3
myIPAddr = '192.168.0.65/24'
bacnet = BAC0.connect(ip = myIPAddr)
def SetTempFromSchedule():
def StoreData():
def SetHeatTemp():
def SetCoolTemp():
schedule.every().minute.at(":00").do(setTempFromSchedule)
while True:
schedule.run_pending()
time.sleep(1)
I was expecting the process to stop when Jupyter Lab and the terminal window which launched Jupter Lab were closed.