功能实现:每秒输出当前时间
from apscheduler.scheduler import Scheduler
import datetime
schedudler = Scheduler(daemonic=False)
@schedudler.cron_schedule(day='*/1', hour='*/1',minute='*/1',second='*/1')
def quote_send_sh_job():
print('a simple cron job start at', datetime.datetime.now())
schedudler.start()
APScheduler版本为2.1.2
转载于:https://blog.51cto.com/10552290/1883094