Search code examples
pythonpython-3.xgoogle-app-enginecroncron-task

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)


Solution

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