add apscheduler

This commit is contained in:
yanyongyu
2020-09-12 13:34:36 +08:00
parent bd7aaa94c6
commit 4a890298db
3 changed files with 33 additions and 0 deletions

12
nonebot/sched.py Normal file
View File

@ -0,0 +1,12 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
try:
from apscheduler.schedulers.asyncio import AsyncIOScheduler
except ImportError:
AsyncIOScheduler = None
if AsyncIOScheduler:
scheduler = AsyncIOScheduler()
else:
scheduler = None