Skip to content

Instantly share code, notes, and snippets.

@matthewbelisle-wf
Created October 31, 2012 17:12
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matthewbelisle-wf/3988391 to your computer and use it in GitHub Desktop.
Save matthewbelisle-wf/3988391 to your computer and use it in GitHub Desktop.
App engine cron syntax validation
>>> import sys
>>> sys.path.append('/usr/local/google_appengine/')
>>> from dev_appserver import fix_sys_path
>>> fix_sys_path()
>>> from google.appengine.api.croninfo import GrocValidator
>>> GrocValidator().Validate('invalidsyntax')
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/api/croninfo.py", li
ne 78, in Validate
value, e.args[0]))
ValidationError: schedule 'invalidsyntax' failed to parse: line 1:10 mismatched character u't' expecting 'c'
>>> GrocValidator().Validate('every day 02:00')
'every day 02:00'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment