小编ik6*_*629的帖子

未找到名为“间隔”的触发器

我一直在使用 APScheduler,在尝试运行代码时出现错误“找不到名为‘间隔’的触发器”

它在我的本地机器上完美无缺,但可以在我的云机器上运行。

我尝试过:通过 pip、easy_install 和手动重新安装 apscheduler;升级安装工具;升级所有依赖项。

编辑:代码

if __name__ == '__main__':
    scheduler = BlockingScheduler()
    scheduler.add_job(SMS, 'interval', minutes=1)
    scheduler.start()
    print Run Complete

    try:
        # This is here to simulate application activity (which keeps the main thread alive).
        while True:
            time.sleep(2)
    except (KeyboardInterrupt, SystemExit):
        scheduler.shutdown()  # Not strictly necessary if daemonic mode is enabled but should be done if possible


LookupError                               Traceback (most recent call last)
<ipython-input-40-2895cd586d3f> in <module>()
      1 if __name__ == '__main__':
      2     scheduler = BlockingScheduler()
----> 3     scheduler.add_job(SMS, …
Run Code Online (Sandbox Code Playgroud)

python ipython-notebook apscheduler

4
推荐指数
2
解决办法
4024
查看次数

标签 统计

apscheduler ×1

ipython-notebook ×1

python ×1