随笔-定时任务

from apscheduler.schedulers.blocking import BlockingScheduler


def teexts(mulls,name):
  print(mulls,name)

# 定时任务
min = '*/' + str(2)
schedulers = BlockingScheduler(timezone='Asia/Shanghai')
schedulers.add_job(func=teexts, args=('6999','chu',),trigger='cron', second=min)
schedulers.start()

# 参考:https://www.cnblogs.com/cherylgi/p/16785027.html
# 参考:https://blog.csdn.net/weixin_44799217/article/details/127353134

你可能感兴趣的:(python,python)