Answer the question
In order to leave comments, you need to log in
How to run a function every day at a certain time using APScheduler?
How to run a function every day at 3:00 using APScheduler?
I only know how to make an interval:
from threading import Thread
from apscheduler.schedulers.asyncio import AsyncIOScheduler
async def test():
#code
def run():
scheduler = AsyncIOScheduler()
scheduler.add_job(test, 'interval', seconds=3)
scheduler.start()
thread = Thread(target=run())
thread.start()
#code
Answer the question
In order to leave comments, you need to log in
already made it myself
from threading import Thread
from apscheduler.schedulers.asyncio import AsyncIOScheduler
async def test():
#code
def run():
scheduler = AsyncIOScheduler()
scheduler.add_job(test, 'cron', hour=3, minute=0)
scheduler.start()
thread = Thread(target=run())
thread.start()
#code
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question