Skip to content

增加定时任务 #49

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 1 commit into
base: broken
Choose a base branch
from
Open

增加定时任务 #49

wants to merge 1 commit into from

Conversation

pwxiao
Copy link

@pwxiao pwxiao commented Nov 24, 2024

增加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)

@pwxiao
Copy link
Author

pwxiao commented Nov 24, 2024

approve

@DarkRRb
Copy link
Contributor

DarkRRb commented Nov 24, 2024

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

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants