from apscheduler.schedulers.asyncio import AsyncIOScheduler scheduler = AsyncIOScheduler() job_id = scheduler.add_job(my_func, 'interval', seconds=5, id='job1') job1 = scheduler.get_job(job_id)
from apscheduler.schedulers.asyncio import AsyncIOScheduler scheduler = AsyncIOScheduler() job1 = scheduler.add_job(my_func, 'interval', seconds=5) job2 = scheduler.add_job(my_coroutine, 'cron', hour=16, minute=30) all_jobs = scheduler.get_jobs()In this example, we create a new async scheduler and add two jobs, one that runs `my_func` every 5 seconds, and another that runs `my_coroutine` at 4:30 PM every day. We then use the `get_jobs` method to retrieve a list of all job objects currently scheduled. Overall, AsyncIOScheduler is a useful class in the apscheduler.schedulers.asyncio library for scheduling async functions and coroutines. The `get_job` method is a handy way to retrieve specific jobs or get a list of all scheduled jobs.