{"id":20390249,"url":"https://github.com/nonebot/plugin-apscheduler","last_synced_at":"2025-04-07T17:08:30.546Z","repository":{"id":46211240,"uuid":"317513027","full_name":"nonebot/plugin-apscheduler","owner":"nonebot","description":"APScheduler Support for NoneBot2","archived":false,"fork":false,"pushed_at":"2024-09-03T08:05:24.000Z","size":178,"stargazers_count":83,"open_issues_count":0,"forks_count":9,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-10-29T23:34:58.648Z","etag":null,"topics":["apscheduler","cron","nonebot-plugin","nonebot2"],"latest_commit_sha":null,"homepage":"https://nonebot.dev/docs/best-practice/scheduler","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nonebot.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"open_collective":"nonebot","custom":["https://afdian.com/@nonebot"]}},"created_at":"2020-12-01T11:00:00.000Z","updated_at":"2024-10-22T02:11:31.000Z","dependencies_parsed_at":"2023-10-16T03:29:52.775Z","dependency_job_id":"8ce83303-0e3e-4506-8bb2-1c6267d23210","html_url":"https://github.com/nonebot/plugin-apscheduler","commit_stats":{"total_commits":50,"total_committers":6,"mean_commits":8.333333333333334,"dds":0.56,"last_synced_commit":"11a8f31ce68b1dac4150b46e67b6dafe077b661b"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nonebot%2Fplugin-apscheduler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nonebot%2Fplugin-apscheduler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nonebot%2Fplugin-apscheduler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nonebot%2Fplugin-apscheduler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nonebot","download_url":"https://codeload.github.com/nonebot/plugin-apscheduler/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247299829,"owners_count":20916190,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apscheduler","cron","nonebot-plugin","nonebot2"],"created_at":"2024-11-15T03:23:52.213Z","updated_at":"2025-04-07T17:08:30.521Z","avatar_url":"https://github.com/nonebot.png","language":"Python","readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://nonebot.dev/\"\u003e\u003cimg src=\"https://nonebot.dev/logo.png\" width=\"200\" height=\"200\" alt=\"nonebot\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n# NoneBot Plugin APScheduler\n\n_✨ NoneBot APScheduler 定时任务插件 ✨_\n\n\u003c/div\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://raw.githubusercontent.com/nonebot/plugin-apscheduler/master/LICENSE\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/license/nonebot/plugin-apscheduler.svg\" alt=\"license\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://pypi.python.org/pypi/nonebot-plugin-apscheduler\"\u003e\n    \u003cimg src=\"https://img.shields.io/pypi/v/nonebot-plugin-apscheduler.svg\" alt=\"pypi\"\u003e\n  \u003c/a\u003e\n  \u003cimg src=\"https://img.shields.io/badge/python-3.7+-blue.svg\" alt=\"python\"\u003e\n\u003c/p\u003e\n\n## 使用方式\n\n加载插件后使用 `require` 获取 `scheduler` 对象（请注意插件加载顺序）\n\n```python\nfrom nonebot import require\n\nrequire(\"nonebot_plugin_apscheduler\")\n\nfrom nonebot_plugin_apscheduler import scheduler\n\n@scheduler.scheduled_job(\"cron\", hour=\"*/2\", id=\"xxx\", args=[1], kwargs={\"arg2\": 2})\nasync def run_every_2_hour(arg1, arg2):\n    pass\n\nscheduler.add_job(run_every_day_from_program_start, \"interval\", days=1, id=\"xxx\")\n```\n\n## 配置项\n\n### apscheduler_autostart\n\n是否自动启动 `scheduler`\n\n### apscheduler_log_level\n\n`int` 类型日志等级\n\n- `WARNING` = `30` (默认)\n- `INFO` = `20`\n- `DEBUG` = `10` (只有在开启 nonebot 的 debug 模式才会显示 debug 日志)\n\n### apscheduler_config\n\n`apscheduler` 的相关配置。参考 [配置 scheduler](https://apscheduler.readthedocs.io/en/latest/userguide.html#scheduler-config), [配置参数](https://apscheduler.readthedocs.io/en/latest/modules/schedulers/base.html#apscheduler.schedulers.base.BaseScheduler)\n\n配置需要包含 `prefix: apscheduler.`\n\n默认配置：\n\n```json\n{ \"apscheduler.timezone\": \"Asia/Shanghai\" }\n```\n","funding_links":["https://opencollective.com/nonebot","https://afdian.com/@nonebot"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnonebot%2Fplugin-apscheduler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnonebot%2Fplugin-apscheduler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnonebot%2Fplugin-apscheduler/lists"}