1 回答

TA貢獻(xiàn)1786條經(jīng)驗(yàn) 獲得超13個(gè)贊
我找到了一個(gè)解決方案,現(xiàn)在 cron 作業(yè)運(yùn)行并在作業(yè)控制中寫入注釋。
myproject 文件夾中的 cron.yaml
cron:
- description: Ausfuehrung des tasks gcinfo
url: /gcinfo
schedule: every 15 minutes from 05:30 to 23:00
timezone: Europe/Berlin
子文件夾 gcinfo 中的 app.yaml
application: myproject
module: gcinfo
version: 1
runtime: go
api_version: go1
handlers:
- url: /gcinfo
script: _go_app
以及 gcinfo.go(gcinfo 子文件夾)中的主要變化
package gcinfo
import (
"net/http"
...
"appengine"
"appengine/urlfetch"
)
func init() {
http.HandleFunc("/gcinfo", gcinfo)
}
...
func gcinfo(w http.ResponseWriter, r *http.Request) {
c := appengine.NewContext(r)
...
}
僅編寫 firebase 引擎不適用于 appengine。我將不得不做更多的研究。
- 1 回答
- 0 關(guān)注
- 224 瀏覽
添加回答
舉報(bào)