views:

37

answers:

1

I'm running a cron file in Google App Engine. It seems to be working fine, except I don't want anyone to be able to access the URL.

Here is my .cron file:

cron:
- description: testing cron
url: /tester
schedule: every 1 minutes

I tried adding: "login: admin" underneath "schedule", but I get:

enter code here
Error parsing yaml file:
Unexpected attribute 'login' for object of type <class 'google.appengine.api.croninfo.CronEntry'>.

So how do I prevent someone from calling the url and running a script that should be automated?

Thanks

+6  A: 

You restrict access to URLs in app.yaml. Add a correspondent entry for your cron tester:

application: hello-cron
version: 1
runtime: python
api_version: 1

handlers:
- url: /tester
  script: tester.py
  login: admin
moraes
Ah, I read that as if it were the cron file. Works now, thanks