How can I run a single Go program namend "gcinfo" (webcrawler with output in firebase) as a cron in Google appengine?
I was able to create a projekt-ID and upload the Go programm with the App SDK. The cron job was executed as defined in the cron.yaml every 15 minutes. There was no error. But i find no output in the log and firebase ist not written. After lots of changes in the app.yaml, gcinfo.yaml and cron.yaml with no result or Errors like (Error code 204). I am now totally confused about the settings in the yaml-files.
Can someone give or point me to a simple example of these settings? I want to run a single Go program as a cron in the app engine every 15 minutes.
My projekt structur is:
- myproject folder with app.yaml and cron.yaml
- myproject subfolder "hello" with hello.yaml and the simple hello.go example with "hello world!"
- myproject subfolder "gcinfo" with gcinfo.yaml and gcinfo.go (go webcrawler with firebase-output)"
app.yaml
application: myproject
version: 1
runtime: go
api_version: go1
handlers:
- url: /.*
script: _go_app
cron.yaml
cron:
- description: Ausfuehrung des tasks gcinfo
url: /gcinfo
schedule: every 15 minutes from 05:30 to 23:00
timezone: Europe/Berlin
target: gcinfo
gcinfo.yaml
application: myproject
module: gcinfo
#version: 1
runtime: go
api_version: go1
handlers:
- url: /gcinfo\.*
script: gcinfo\gcinfo.go
My gcinfo.go has the following structure
package gcinfo
import (
...
)
....
func gcinfo() {
....
}
There are no errors with this configuration in the "goapp deploy" and the appengine reacts every 15 minutes for 6ms, but there is no output for the go programm gcinfo. I have already tryed to make gcinfo to main with same result.