Dan*_*Dan 5 google-app-engine python-2.7
我有app.yaml如下:
application: myapp
module: mymodule
version: 1
runtime: python27
api_version: 1
threadsafe: true
...
Run Code Online (Sandbox Code Playgroud)
该应用程序还具有cron.yaml以下内容:
cron:
- description: increase a value every hour
url: /test/inc
schedule: every 60 minutes synchronized
Run Code Online (Sandbox Code Playgroud)
如何制作我的cron作业目标mymodule而不是default模块?
在较新版本的GAE(至少测试过1.8.6)中,您可以设置cron任务的目标:
cron:
- description: increase a value every hour
url: /test/inc
schedule: every 60 minutes synchronized
target: mymodule
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1880 次 |
| 最近记录: |