我已使用this计划任务:
if __name__ == '__main__':
channel_crawler(priority=1)
schedule.every(PRIORITY[1]["interval"]).minutes.do(channel_crawler, priority=1)
schedule.every().day.at("17:30").do(distance_fixer)
while True:
schedule.run_pending()
time.sleep(1)
channel_crawler
大约需要5 minutes
来运行,distance_fixer
大约需要5 hours
。当我在运行distance_fixer
时运行我的代码,计划不会每10 minutes
运行channel_crawler
。如何并行运行我的函数?在
可以对作业使用多处理,因此每个进程都运行每个函数
相关问题 更多 >
编程相关推荐