""" @author: luojunhui """ import time from config import accountBaseInfo from tqdm import tqdm from tasks.task4 import update_articles import schedule def run(): gh_id_set = set() for key in accountBaseInfo: value = accountBaseInfo[key]['ghId'] gh_id_set.add(value) for gh_id in tqdm(gh_id_set): try: update_articles(gh_id) except Exception as e: print(e) continue if __name__ == '__main__': schedule.every().day.at("21:00").do(run) while True: schedule.run_pending() print("定时任务正在执行") time.sleep(1)