简体   繁体   English

Python Google App Engine Cron作业无法正常工作

[英]Python Google App Engine Cron Job Not Working

I am creating cron job and it's work on the local dev sever ( http://localhost:8000/cron ). 我正在创建cron作业,它在本地开发服务器( http:// localhost:8000 / cron )上工作。

I uploaded application to google app engine, but I see "You have not created any scheduled tasks (cron jobs) for this application." 我已将应用程序上载到google app引擎,但看到“您尚未为此应用程序创建任何计划任务(计划任务)。”

My cron.yaml: 我的cron.yaml:

cron:
- description: calc week raiting
  url: /cron_everyhour
  schedule: every 1 hours

My app.yaml: 我的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

在某些情况下,仅上传应用程序不会更新cron作业,在这种情况下,您需要专门使用appcfg.py update_cron更新cron作业,请参阅https://cloud.google.com/appengine/docs/python/config / cron#Python_app_yaml_Uploading_cron_jobs

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM