Google app engine 是否可以使用内置延迟处理程序在Google App Engine中调度cron任务?
我的app.yaml文件中有以下内容Google app engine 是否可以使用内置延迟处理程序在Google App Engine中调度cron任务?,google-app-engine,cron,Google App Engine,Cron,我的app.yaml文件中有以下内容 builtins: - deferred: on handlers: - url: /_ah/queue/deferred.* script: google.appengine.ext.deferred.deferred.application login: admin 是否可以将google.appengine.ext.deferred.deferred.application作为cron作业来安排一些公开的任务?cron.yaml文件中的UR
builtins:
- deferred: on
handlers:
- url: /_ah/queue/deferred.*
script: google.appengine.ext.deferred.deferred.application
login: admin
是否可以将google.appengine.ext.deferred.deferred.application作为cron作业来安排一些公开的任务?cron.yaml文件中的URL是什么?是的,这是可能的
cron.yaml
cron:
- description: daily summary job
url: /cron-job-url
schedule: every 24 hours
例如,/cron作业url
的请求处理程序中的(未测试)调用延迟任务
class CronJob(webapp2.RequestHandler):
def get(self):
deferred.defer(do_something_expensive, "Hello, world!", 42, True)
self.response.set_status(200)
app = webapp2.WSGIApplication([
('/cron-job-url', CronJob),
], debug=True)
是的,这是可能的
cron.yaml
cron:
- description: daily summary job
url: /cron-job-url
schedule: every 24 hours
例如,/cron作业url
的请求处理程序中的(未测试)调用延迟任务
class CronJob(webapp2.RequestHandler):
def get(self):
deferred.defer(do_something_expensive, "Hello, world!", 42, True)
self.response.set_status(200)
app = webapp2.WSGIApplication([
('/cron-job-url', CronJob),
], debug=True)
我曾尝试使用cron url访问延迟函数,但不起作用,cron似乎完全独立,无法访问延迟库。我曾尝试使用cron url访问延迟函数,但不起作用,cron似乎完全独立,无法访问延迟库。