Run a python script on schedule on Google App Engine

后端 未结 2 435
野性不改
野性不改 2021-02-03 13:33

I\'m looking for a good samaritan that can provide with a very basic skeleton to run a python script using Google App Engine. I have read the documentation, check on related SO

2条回答
  •  佛祖请我去吃肉
    2021-02-03 13:58

    The answer I mentioned still applies - you won't be able to run your scripts in a standalone manner on GAE cron, simply because the cron service is really just a set of scheduled GET requests. You may be able to achieve the same end result, but by:

    • installing a skeleton app
    • breaking down your scripts into code that you'd stuff into the app's handlers, with arguments passed in the request's query strings
    • configuring the cron service to build and trigger those requests

    You can find a Python 3 skeleton in Quickstart for Python 3 in the App Engine Standard Environment

    Alternatively you could, of course, use an IaaS service instead of GAE, like Google Compute Engine, where you could run your scripts directly, with a traditional cron service.

提交回复
热议问题