功能实现:每秒输出当前时间
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
时间: 2024-10-12 18:13:15