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)