定时任务

import schedule
import time
def Schedule():

print(1)


def main():
schedule.every().seconds.do(Schedule)

while True:
schedule.run_pending()

time.sleep(10)

main()
原文地址:https://www.cnblogs.com/lvyinhaoqing/p/15200998.html