mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-09-11 14:36:58 +00:00
✨ add apscheduler
This commit is contained in:
12
nonebot/sched.py
Normal file
12
nonebot/sched.py
Normal 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
|
Reference in New Issue
Block a user