0
votes

My cron job runs python code from App Engine on a scheduled time, but works only when I am logged in to the Google Cloud shell. When I quit Google Cloud shell, the cron job is still executed, but the python code takes no effect in BigQuery, where it should write data (as it does when I am logged in).

My guess it has something to do with authentication, but due to the docs, it should "just work" with my credentials. http://google-cloud-python.readthedocs.io/en/latest/core/auth.html

Any guesses what to do to make it work?

1

1 Answers

1
votes

This won't work in Google Cloud Shell. Cloud Shell is not meant for non-interactive use and the VM is reclaimed soon after you log out or a period of inactivity. See https://cloud.google.com/shell/docs/limitations#usage_limits for more information.