在服务器的重新启动时安排一些任务

发布于 2025-01-28 03:51:24 字数 157 浏览 4 评论 0原文

在我的服务器中,我安排了一些在背景线程中运行的任务,如果我重新启动服务器,所有这些计划的任务将消失。

因此,我已经在数据库中添加了所有计划的任务,现在每当重新启动服务器时,我都想再次安排数据库中存在的所有任务。

因此,每当重新启动服务器时,是否有任何方法可以执行一组功能?

In my server, I have some tasks scheduled which are running in the background threads and if I restart my server all those scheduled tasks will be gone.

So I have added all the scheduled tasks in the database and now whenever the server is restarted I want to again schedule all the tasks which were present in the database.

So is there any way to execute a set of functions whenever the server is rebooted?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文