python BlockingScheduler 每天执行一次
from apscheduler.schedulers.blocking import BlockingScheduler
import time
def write_1000_words():
# Write 1000 words
print("Writing 1000 words...")
# Create a new scheduler
scheduler = BlockingScheduler()
# Schedule the job to run every day at a specific time
scheduler.add_job(write_1000_words
'interval'
days=1
start_date='2022-01-01 00:00:00')
# Start the scheduler
scheduler.start()
while True:
time.sleep(1)
版权声明:本站内容源自互联网,如有内容侵犯了你的权益,请联系删除相关内容。
上一篇:红色促销标签怎么搭配 下一篇:个人外贸建站