是否有可能在谷歌应用程序引擎中启动计时器? [英] Is it possible to start a timer in google app engine?

查看:104
本文介绍了是否有可能在谷歌应用程序引擎中启动计时器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

例如,每30秒检查一次状态或定期轮询一个Web服务? 解决方案

App Engine Cron服务允许您配置按定义的时间或定期间隔运行的定期计划的任务<在您的应用程序的根目录下( app.yaml ),应用程序根目录中的 cron.yaml / code>)为您的Python应用程序配置计划任务。

例如:

   - 描述:Web服务轮询
url:/ tasks / pollawebservice
计划:每30分钟

url 字段在您的应用程序中指定一个将由Cron服务调用的URL。


For instance, check a status every 30 seconds or poll a web service periodically ?

解决方案

App Engine Cron Service allows you to configure regularly scheduled tasks that operate at defined times or regular intervals

A cron.yaml file in the root directory of your application (alongside app.yaml) configures scheduled tasks for your Python application.
For example:

- description: Webservice polling
  url: /tasks/pollawebservice
  schedule: every 30 minutes

The url field specifies a URL in your application that will be invoked by the Cron Service.

这篇关于是否有可能在谷歌应用程序引擎中启动计时器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆