From 442dab54daa71cbfa5745120d357a6a0a5c78206 Mon Sep 17 00:00:00 2001 From: DingZQ Date: Wed, 19 Mar 2025 22:41:02 +0800 Subject: [PATCH] Refine --- auto_cache.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/auto_cache.py b/auto_cache.py index 7aa9a0b..65a9a4d 100644 --- a/auto_cache.py +++ b/auto_cache.py @@ -31,4 +31,8 @@ def auto_cache_data(): query_all_records_by_date_with_type_link(str_prev_day) if __name__ == "__main__": - auto_cache_data() + schedule.every().day.at("03:00").do(auto_cache_data) + + while True: + schedule.run_pending() + time.sleep(1)