1
votes

I'm having some trouble creating a Google App Engine Cron task for my Web2Py application. I've looked at the instructions for GAE Cron, and this is the task I created as a test:

my cron.yaml file is in the same directory as my app.yaml, the path to my python controller is applications/data/default, and the url to access the function is myapp.appspot.com/data/default/test.

This is my cron task entry:

cron:
- description: test
  url: data/default/test
  schedule: every 2 minutes synchronized

however, I'm getting this error when I try to deploy:

Unable to assign value 'data/default/test' to attribute 'url':
Value 'data/default/test' for url does not match expression '^(?:^/.*$)$'

This is the handlers portion of my app.yaml file:

handlers:

# Warning! Static mapping - below - isn't compatible with 
# the parametric router's language logic. 
# You cannot use them together.

- url: /(.+?)/static/_(\d+\.\d+\.\d+)\/(.+)
  static_files: applications/\1/static/\3
  upload: applications/(.+?)/static/(.+)
  secure: optional
  expiration: "365d"

- url: /(.+?)/static/(.+)
  static_files: applications/\1/static/\2
  upload: applications/(.+?)/static/(.+)
  secure: optional

- url: /favicon.ico
  static_files: applications/welcome/static/favicon.ico
  upload: applications/welcome/static/favicon.ico

- url: /robots.txt
  static_files: applications/welcome/static/robots.txt
  upload: applications/welcome/static/robots.txt

- url: .*
  script: gaehandler.wsgiapp    # WSGI (Python 2.7 only)
  secure: optional

I'm pretty lost here, as I'm not too familiar with google app engine or web2py. Any help would be appreciated

1

1 Answers

2
votes

You're missing a slash in your cron.yaml url specification:

cron:
- description: test
  url: /data/default/test
  schedule: every 2 minutes synchronized