【Python】定时调度

from datetime import datetime
from apscheduler.schedulers.blocking import BlockingScheduler
 
 
def tick():
    print(datetime.now())
 
 
if __name__ == '__main__':
    scheduler = BlockingScheduler()
    scheduler.add_job(tick, 'interval', seconds=1.0000000)
 
    scheduler.start()

 

转载于:https://www.cnblogs.com/tiandsp/p/8504198.html

你可能感兴趣的:(【Python】定时调度)