我在GAE上运行每日报告任务,因为最近使用的内存太多而无法完成。因此我想将其设置为后端任务。我已经设置的后端如下:GAE Python - 如何设置cron作业以启动后端任务
backends:
- name: reporting
class: B4_1G
options: dynamic
start: reporting.app
在reporting.py有一些被定义的类,它调用不同的报告。我cron.yaml目前看起来是这样的:
cron:
- description: update report 1
url: /reports/report1
schedule: every day 03:00
- description: update report 2
url: /reports/report2
schedule: every day 03:30
但是在逻辑上这只是呼吁前端实例的工作,通过它目前看起来像这样的app.yaml:
application: appname
version: 1
runtime: python27
api_version: 1
threadsafe: true
handlers:
- url: /(robots\.txt)
static_files: \1
upload: (robots\.txt)
- url: /favicon\.ico
static_files: favicon.ico
upload: favicon\.ico
- url: /sitemap\.xml
static_files: sitemap.xml
upload: sitemap\.xml
- url: /images
static_dir: images
- url: /js
static_dir: js
- url: /css
static_dir: css
- url: /reports/.*
script: reporting.app
login: admin
我会得到什么改变每天在后端实例上调用这些作业?
感谢您的更新! –