I've tried to do this:
sched = AsyncIOScheduler(timezone='Europe/Moscow')
sched.add_jobstore(SQLAlchemyJobStore(url='sqlite:///ProjectDB.sqlite'))
sched.add_job(create_note, 'interval', seconds=5, kwargs={'bot': bot, 'id':id})
with function:
async def create_note(bot: Bot, id):
await bot.send_message(chat_id=id, text='some text')
But I got this: TypeError: cannot pickle 'SSLContext' object