Python 3.x bluemix上的python调度程序

Python 3.x bluemix上的python调度程序,python-3.x,ibm-cloud,openwhisk,ibm-cloud-functions,Python 3.x,Ibm Cloud,Openwhisk,Ibm Cloud Functions,我使用python中的schedule包,每15秒调用一个函数,并希望在IBMBlueMix上运行此代码。 已使用-no-route选项将应用程序推送到Bluemix,尽管应用程序已部署到Bluemix,但Bluemix无法启动应用程序 下面是我尝试过的示例代码 import schedule import time def printMyName(): print("NAME...") schedule.every(15).seconds.do(printMyName) whi

我使用python中的schedule包,每15秒调用一个函数,并希望在IBMBlueMix上运行此代码。 已使用-no-route选项将应用程序推送到Bluemix,尽管应用程序已部署到Bluemix,但Bluemix无法启动应用程序

下面是我尝试过的示例代码

import schedule
import time

def printMyName():
    print("NAME...")

schedule.every(15).seconds.do(printMyName)


while 1:
   schedule.run_pending()
   time.sleep(10)
此应用程序的Bluemix日志中的消息:

Destroying container
Successfully destroyed container

0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
过了一会儿,我在日志中看到了这条消息

ERR Timed out after 1m0s: health check never passed.
Python版本:3.4.4

我已经完成了,并且成功了。有人帮了我的忙


今天,我建议大家看看/OpenWhisk和。通过警报,您可以以类似cron的方式调用这些Python函数,而且成本可能更低。

我通过设置

health-check-type: process
此网站上的cloud foundry文档如下:


我的项目在这里:

尝试在清单中添加no路由,但没有帮助,仍然是相同的行为。并且查看了您的博客,git中的源代码看起来您还没有使用Procfile。但对我来说,如果我尝试在没有Procfile的情况下推送,我会收到一条消息,要求我提供该文件。您是否使用了特定的buildpack?健康检查类型是在我测试我的后引入的。现在需要使用它。但是,我保留使用IBM云功能的建议。对于类似cron的事件,您不需要自己的服务器。