I am working on my first app. I chose to go with the Flexible Python environment interacting with DataTables. I have the app working and it is secured with Identity-Aware Proxy to limit access to our company domain.
I am now trying to deploy a cron job to periodically clean old entities to keep the data set size down. I have the cleanup task working and can run it manually. However, I continually get the following error in the logs when trying to have it run automatically:
Request failed because URL requires user login. For requests invoked within App Engine (offline requests like Task Queue, or webhooks like XMPP and Incoming Mail), the URL must require admin login (or no login).
From what I read in the documentation, the Flex environment no longer uses the handlers section of the app.yaml file and the app is supposed to handle verification of the cron service itself. But this error seems to indicate that the script is not even being run.
I have tried the following with the result being that error message above each time: 1. turning off IAP and having no restrictions on access 2. adding a handlers section to the app.yaml file for the /clean job
Has anyone run into this problem and gotten it to work?
app.yaml:
service: dashboard
env: flex
runtime: python
entrypoint: gunicorn -b :$PORT dashboard:app --timeout 300
api_version: 1
threadsafe: false
skip_files:
- ^(.*/)?\.pyc$
runtime_config:
python_version: 2
cron.yaml:
cron:
- description: remove old cluster heartbeats
url: /clean?
schedule: every 24 hours
target: dashboard