执行内部功能

2024-04-20 02:56:03 发布

您现在位置:Python中文网/ 问答频道 /正文

我在安装龙卷风服务器。当这个服务器运行时,我想以5分钟的间隔进行多个异步调用。因此,当服务器运行时,它应该每5分钟运行一个函数。我想知道解决这个问题的最佳方案是什么?我应该使用像apscheduler这样的东西,还是可以使用tornado在本地完成?你知道吗


Tags: 函数服务器间隔方案tornadoapscheduler
1条回答
网友
1楼 · 发布于 2024-04-20 02:56:03

它可以通过PeriodicCallback本地完成:

Schedules the given callback to be called periodically.

The callback is called every callback_time milliseconds. Note that the timeout is given in milliseconds, while most other time-related functions in Tornado use seconds.

你可以在docs上看到它。你知道吗

相关问题 更多 >