FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

增加定时任务 by GaIIagherdev · Pull Request #49 · LagrangeDev/lagrange-python · GitHub

增加定时任务 - #49

Open
GaIIagherdev wants to merge 1 commit into
LagrangeDev:brokenfrom
GaIIagherdev:broken
Open

增加定时任务#49
GaIIagherdev wants to merge 1 commit into
LagrangeDev:brokenfrom
GaIIagherdev:broken

Conversation

Copy link
Copy Markdown

增加schedule_task方法实现定时任务

lag = Lagrange(
    int(os.environ.get("LAGRANGE_UIN", "0")),
    "linux",
    os.environ.get("LAGRANGE_SIGN_URL", "https://sign.lagrangecore.org/api/sign/25765")
)
install_loguru()
lag.log.set_level("DEBUG")
lag.subscribe(GroupMessage, msg_handler)

# 添加计划任务
lag.schedule_task(scheduled_task)

Copy link
Copy Markdown
Author

approve

Copy link
Copy Markdown
Contributor

Scheduled tasks should be provided by the upper level framework or users themselves

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL