Skip to content

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

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