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