我正在创建cron作业,并且它在本地开发服务器(http://localhost:8000/cron)上工作。
我将应用程序上传到谷歌应用引擎,但我看到"您还没有为此应用程序创建任何计划任务(cron作业)。"
我的cron.yaml:
cron:
- description: calc week raiting
url: /cron_everyhour
schedule: every 1 hours
我的app.yaml:
application: w....
version: 1
runtime: python27
api_version: 1
threadsafe: true
libraries:
- name: django
version: "1.2"
handlers:
- url: /css
static_dir: css
- url: /images
static_dir: images
- url: /img
static_dir: img
- url: /js
static_dir: js
- url: /sound
static_dir: sound
- url: /swf
static_dir: swf
- url: /favicon\.ico
static_files: images/favicon.ico
upload: images/favicon\.ico
- url: /apple-touch-icon-precomposed.png
static_files: js/apple-touch-icon-precomposed.png
upload: js/apple-touch-icon-precomposed.png
- url: /apple-touch-icon.png
static_files: js/apple-touch-icon.png
upload: js/apple-touch-icon.png
- url: .*
script: main.APP
答案 0 :(得分:2)
在某些情况下,单独上传应用程序并不会更新cron作业,在这种情况下,您需要使用appcfg.py update_cron
专门更新cron作业,请参阅https://cloud.google.com/appengine/docs/python/config/cron#Python_app_yaml_Uploading_cron_jobs