简体   繁体   中英

How can I make a cron.yaml file to run python script every hour for google cloud app engine

So I have this in my cron.yaml:

cron:
- description: "Google analytics data collection"
  url: /usr/bin/python3.7 /home/amng853/ruby-website/google_analytics_info.py
  schedule: every 1 hours

but it keeps returning:

ERROR: (gcloud.app.deploy) Server responded with code [500]:
  Internal Server Error.
  <h3>Server Error</h3><p>A server error has occurred.</p>

when I deploy the cron.yaml and I don't know what to do.

I also tried to user python3 instead of python3.7 path but still displays the error. (Yes I have python3.7 and python3 installed)

In general you can not do this. You need to create endpoint, and then run that url.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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