# 安装
pip install apscheduler==2.1.12
from apscheduler.scheduler import Scheduler
sched = Scheduler()
@sched.interval_scheduler(seconds=60)
def func():
print("每60秒执行一次该函数")
# 启动定时器
sched.start
参考文献
https://www.cnblogs.com/AmilyWilly/p/6438472.html # 实现单一功能使用
https://www.jianshu.com/p/4f5305e220f0 # 非常详细
https://www.cnblogs.com/luxiaojun/p/6567132.html # 入门级使用