【问题标题】:Python Google App Engine Cron Job Not WorkingPython Google App Engine Cron 作业不工作
【发布时间】:2015-11-19 06:45:28
【问题描述】:

我正在创建 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

【问题讨论】:

    标签: python google-app-engine cron


    【解决方案1】:

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

    【讨论】:

      猜你喜欢
      • 2010-11-17
      • 1970-01-01
      • 2012-08-31
      • 1970-01-01
      • 2017-11-30
      • 2019-04-14
      • 1970-01-01
      • 2023-03-14
      • 2018-09-23
      相关资源
      最近更新 更多