From 57ff73269b2410435e0f4f9478b3db8069654934 Mon Sep 17 00:00:00 2001 From: Ju4tCode <42488585+yanyongyu@users.noreply.github.com> Date: Sun, 11 Jul 2021 15:19:04 +0800 Subject: [PATCH] Update scheduler.md --- docs/advanced/scheduler.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/advanced/scheduler.md b/docs/advanced/scheduler.md index ac455931..abab298e 100644 --- a/docs/advanced/scheduler.md +++ b/docs/advanced/scheduler.md @@ -47,9 +47,9 @@ poetry add nonebot-plugin-apscheduler ```python from nonebot import require -scheduler = require('nonebot_plugin_apscheduler').scheduler +scheduler = require("nonebot_plugin_apscheduler").scheduler -@scheduler.scheduled_job('cron', hour='*/2', id='xxx', args=[1], kwargs={arg2: 2}) +@scheduler.scheduled_job("cron", hour="*/2", id="xxx", args=[1], kwargs={"arg2": 2}) async def run_every_2_hour(arg1, arg2): pass @@ -71,7 +71,7 @@ scheduler.add_job(run_every_day_from_program_start, "interval", days=1, id="xxx" ```python from nonebot import require -scheduler = require('nonebot_plugin_apscheduler').scheduler +scheduler = require("nonebot_plugin_apscheduler").scheduler ``` ### 编写定时任务