def backgroundThread():
schedule.every().day.at("12:00").do(update)
#schedule.every(5).minutes.do(update)
kill_update = threading.Event()
class SearchUpdateThread(threading.Thread):
def run(self):
while not kill_update.is_set():
schedule.run_pending()
time.sleep(1*60*60) #Every hour.
searchThread = SearchUpdateThread()
searchThread.setDaemon(True)
searchThread.start()
periodicUpdate.py 文件源码
python
阅读 19
收藏 0
点赞 0
评论 0
评论列表
文章目录