Is it possible to start a timer in google app engi

2019-07-04 04:48发布

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

2条回答
Ridiculous、
2楼-- · 2019-07-04 04:57

Yes, you can use the task queue. A task can be configured to run at custom intervals and can perform pretty much any action.

查看更多
家丑人穷心不美
3楼-- · 2019-07-04 05:00

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.

查看更多
登录 后发表回答