Created
October 31, 2012 17:12
-
-
Save matthewbelisle-wf/3988391 to your computer and use it in GitHub Desktop.
App engine cron syntax validation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> 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