NoneBot插件AP计划程序
:sparkles: NoneBot APScheduler定时任务插件 :sparkles:
使用方式
加载插件后使用require获取scheduler对象(请注意插件加载顺序)
from nonebot import require
scheduler = require ( "nonebot_plugin_apscheduler" ). scheduler
@ scheduler . scheduled_job ( "cron" , hour = "*/2" , id = "xxx" , args = [ 1 ], kwargs = { arg2 : 2 })
async def run_every_2_hour ( arg1 , arg2 ):
pass
scheduler . add_job ( run_every_day_from_program_start , "i
2021-11-02 18:18:02
14KB
Python
1